mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f95d2bda4
commit
f363bc8326
@ -202,7 +202,7 @@ Program::Execute(const Path& path,
|
|||||||
execv(path.c_str(), (char**)args);
|
execv(path.c_str(), (char**)args);
|
||||||
// If the execve() failed, we should exit and let the parent pick up
|
// If the execve() failed, we should exit and let the parent pick up
|
||||||
// our non-zero exit status.
|
// our non-zero exit status.
|
||||||
exit(127);
|
exit(errno == ENOENT ? 127 : 126);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parent process: Break out of the switch to do our processing.
|
// Parent process: Break out of the switch to do our processing.
|
||||||
|
Loading…
Reference in New Issue
Block a user