diff options
author | Simon Howard | 2009-12-18 21:10:35 +0000 |
---|---|---|
committer | Simon Howard | 2009-12-18 21:10:35 +0000 |
commit | e81acc7df5f7939d93c6724e422f823111dfeba0 (patch) | |
tree | 0b5807af06b3930005d58c167ad6f7ae25b0d75c /setup | |
parent | 4f540343e63eb60f209ce7e8ce26db10c16ab4e6 (diff) | |
download | chocolate-doom-e81acc7df5f7939d93c6724e422f823111dfeba0.tar.gz chocolate-doom-e81acc7df5f7939d93c6724e422f823111dfeba0.tar.bz2 chocolate-doom-e81acc7df5f7939d93c6724e422f823111dfeba0.zip |
Make ExecuteCommand() under Unix return a failure when the executable
cannot be executed.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1748
Diffstat (limited to 'setup')
-rw-r--r-- | setup/execute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/setup/execute.c b/setup/execute.c index 59f561be..8e753f60 100644 --- a/setup/execute.c +++ b/setup/execute.c @@ -312,7 +312,7 @@ static int ExecuteCommand(const char *program, const char *arg) execvp(argv[0], (char **) argv); - exit(-1); + exit(0x80); } else { @@ -321,7 +321,7 @@ static int ExecuteCommand(const char *program, const char *arg) waitpid(childpid, &result, 0); - if (WIFEXITED(result)) + if (WIFEXITED(result) && WEXITSTATUS(result) != 0x80) { return WEXITSTATUS(result); } |