diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2012-05-29 06:21:39 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-16 21:56:47 +0400 |
commit | 570f1e6e1a7145efb4e80da9c711fcbc319f6b17 (patch) | |
tree | 53b9eed81fe2e885f1a46f3478989e2953e1543c /compat | |
parent | 51822653f58e6b9b6119f560ff864813fbde81ba (diff) |
Win32: let mingw_execve() return an int
This is in the great tradition of POSIX. Original fix by Olivier Refalo.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index d242557eb57..7da73fa6178 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1019,7 +1019,7 @@ static int try_shell_exec(const char *cmd, char *const *argv, char **env) return pid; } -static void mingw_execve(const char *cmd, char *const *argv, char *const *env) +static int mingw_execve(const char *cmd, char *const *argv, char *const *env) { /* check if git_command is a shell script */ if (!try_shell_exec(cmd, argv, (char **)env)) { @@ -1027,11 +1027,12 @@ static void mingw_execve(const char *cmd, char *const *argv, char *const *env) pid = mingw_spawnve(cmd, (const char **)argv, (char **)env, 0); if (pid < 0) - return; + return -1; if (waitpid(pid, &status, 0) < 0) status = 255; exit(status); } + return -1; } int mingw_execvp(const char *cmd, char *const *argv) |