projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f95d2b
)
Follow Unix behavior and return 127 if the command is not found,
author
Dan Gohman
<gohman@apple.com>
Tue, 4 Aug 2009 23:15:49 +0000
(23:15 +0000)
committer
Dan Gohman
<gohman@apple.com>
Tue, 4 Aug 2009 23:15:49 +0000
(23:15 +0000)
and 126 if it is not executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78120
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Unix/Program.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/Program.inc
b/lib/System/Unix/Program.inc
index d2baca80025b52d0ce2533d2cb5631dc4cef0c3c..4814228e138c98e025bae6067811267b4bd27977 100644
(file)
--- 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.