From e81acc7df5f7939d93c6724e422f823111dfeba0 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 18 Dec 2009 21:10:35 +0000 Subject: Make ExecuteCommand() under Unix return a failure when the executable cannot be executed. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1748 --- setup/execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setup') 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); } -- cgit v1.2.3