summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorSimon Howard2009-12-18 21:10:35 +0000
committerSimon Howard2009-12-18 21:10:35 +0000
commite81acc7df5f7939d93c6724e422f823111dfeba0 (patch)
tree0b5807af06b3930005d58c167ad6f7ae25b0d75c /setup
parent4f540343e63eb60f209ce7e8ce26db10c16ab4e6 (diff)
downloadchocolate-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.c4
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);
}