[llvm-commits] [llvm] r78120 - /llvm/trunk/lib/System/Unix/Program.inc
Dan Gohman
gohman at apple.com
Tue Aug 4 16:16:08 PDT 2009
Author: djg
Date: Tue Aug 4 18:15:49 2009
New Revision: 78120
URL: http://llvm.org/viewvc/llvm-project?rev=78120&view=rev
Log:
Follow Unix behavior and return 127 if the command is not found,
and 126 if it is not executable.
Modified:
llvm/trunk/lib/System/Unix/Program.inc
Modified: llvm/trunk/lib/System/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Program.inc?rev=78120&r1=78119&r2=78120&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Program.inc (original)
+++ llvm/trunk/lib/System/Unix/Program.inc Tue Aug 4 18:15:49 2009
@@ -202,7 +202,7 @@
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.
More information about the llvm-commits
mailing list