-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
When trying to run the first example code from #1813 with an executable that can't be found, the error trace is weird. It looks like the return address array is filled with addresses from windowsCreateProcess.
I believe this is due to the loop in spawnWindows that tries every directory from PATH and returns a lot of errors because the file doesn't exist.
As for why it is sometimes PATH_NOT_FOUND and others FILE_NOT_FOUND, I assume my PATH contains some old directories that don't exist anymore.
Example output:
$ zig run childprocess.zig
error: Unexpected
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:693:45: 0x7ff663ac4a97 in windowsCreateProcess (run.obj)
windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
^
D:\DEV\Install\zig\lib\zig\std\os\index.zig:2253:5: 0x7ff663aa3442 in unexpectedErrorWindows (run.obj)
return error.Unexpected;
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:696:21: 0x7ff663ac4a5d in windowsCreateProcess (run.obj)
else => return os.unexpectedErrorWindows(err),
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:611:21: 0x7ff663ac34d6 in ChildProcess::ChildProcess_spawnWindows (run.obj)
return err;
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:127:13: 0x7ff663ac09ce in ChildProcess::ChildProcess_spawn (run.obj)
return self.spawnWindows();
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:209:9: 0x7ff663ac01bb in ChildProcess::ChildProcess_exec (run.obj)
try child.spawn();
^
D:\DEV\Zig\error-traces\childprocess.zig:5:18: 0x7ff663abff2a in main (run.obj)
const result = try std.os.ChildProcess.exec(
^
D:\DEV\Install\zig\lib\zig\std\os\child_process.zig:692:45: 0x7ff663ac4a7a in windowsCreateProcess (run.obj)
windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.