Skip to content
Permalink
Browse files

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>
  • Loading branch information...
dscho committed May 24, 2017
1 parent fe31e2c commit abd867df209a33ad446fce2e233cda0d24b4ff53
Showing with 3 additions and 2 deletions.
  1. +3 −2 compat/mingw.c
@@ -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);
}

0 comments on commit abd867d

Please sign in to comment.
You can’t perform that action at this time.