mirror of
https://github.com/git/git.git
synced 2026-01-27 19:12:01 +00:00
fixup! mingw: kill unterminated child processes on signals
Let's be careful not to close a handle that has been closed already... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -1523,8 +1523,9 @@ static void kill_child_processes_on_signal(void)
|
||||
while (pinfo) {
|
||||
struct pinfo_t *info = pinfo;
|
||||
pinfo = pinfo->next;
|
||||
exit_process(info->proc, status);
|
||||
CloseHandle(info->proc);
|
||||
if (exit_process(info->proc, status))
|
||||
/* the handle is still valid in case of error */
|
||||
CloseHandle(info->proc);
|
||||
free(info);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user