mirror of
https://github.com/git/git.git
synced 2026-02-20 14:50:01 +00:00
POSIX style 2/2
This commit is contained in:
committed by
Johannes Schindelin
parent
967b1b84bb
commit
cb9077b049
@@ -1233,7 +1233,7 @@ static int try_shell_exec(const char *cmd, char *const *argv)
|
||||
return pid;
|
||||
}
|
||||
|
||||
void mingw_execv(const char *cmd, char *const *argv)
|
||||
int mingw_execv(const char *cmd, char *const *argv)
|
||||
{
|
||||
/* check if git_command is a shell script */
|
||||
if (!try_shell_exec(cmd, argv)) {
|
||||
@@ -1241,11 +1241,12 @@ void mingw_execv(const char *cmd, char *const *argv)
|
||||
|
||||
pid = mingw_spawnv(cmd, (const char **)argv, 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)
|
||||
|
||||
Reference in New Issue
Block a user