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 | 6faa1d2f8fe4c0feb49d72767c37104fd270c295 (patch) | |
tree | 4c27a34215072b7d74538343b8585b5f30c6d270 /llvm/lib/System/Unix | |
parent | 694285ca6d79141fc147c3841f14fcb199690721 (diff) | |
download | bcm5719-llvm-6faa1d2f8fe4c0feb49d72767c37104fd270c295.tar.gz bcm5719-llvm-6faa1d2f8fe4c0feb49d72767c37104fd270c295.zip |
Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable.
llvm-svn: 78120
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r-- | llvm/lib/System/Unix/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc index d2baca80025..4814228e138 100644 --- a/llvm/lib/System/Unix/Program.inc +++ b/llvm/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. |