diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-04 23:15:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-04 23:15:49 +0000 |
commit | 563ab50facfcdb65378a5a5a5c24ce07886299b6 (patch) | |
tree | 17c56d4d0b64d5ca5033b976cde792bfc95ea105 /lib/System/Unix/Program.inc | |
parent | d89380fc280420ecc35db3fd820a5851c2c26b8b (diff) | |
download | external_llvm-563ab50facfcdb65378a5a5a5c24ce07886299b6.zip external_llvm-563ab50facfcdb65378a5a5a5c24ce07886299b6.tar.gz external_llvm-563ab50facfcdb65378a5a5a5c24ce07886299b6.tar.bz2 |
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
Diffstat (limited to 'lib/System/Unix/Program.inc')
-rw-r--r-- | lib/System/Unix/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index d2baca8..4814228 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -202,7 +202,7 @@ Program::Execute(const Path& path, execv(path.c_str(), (char**)args); // If the execve() failed, we should exit and let the parent pick up // our non-zero exit status. - exit(127); + exit(errno == ENOENT ? 127 : 126); } // Parent process: Break out of the switch to do our processing. |