diff --git a/contrib/win32/win32compat/socket.c b/contrib/win32/win32compat/socket.c index 57083f6..9317a4b 100644 --- a/contrib/win32/win32compat/socket.c +++ b/contrib/win32/win32compat/socket.c @@ -1994,6 +1994,13 @@ int WSHELPAddChildToWatch ( HANDLE processtowatch) return 0; } +int WSHELPDelChildToWatch ( HANDLE processtowatch) +{ + if ( ChildToWatch == processtowatch ) + ChildToWatch = NULL ; + return 0; +} + int WSHELPselect(int fds, fd_set* readsfds, fd_set* writesfds, fd_set* exceptsfds, const struct timeval* timeout) { diff --git a/serverloop.c b/serverloop.c index 4063e7c..2c631f4 100644 --- a/serverloop.c +++ b/serverloop.c @@ -879,6 +879,8 @@ collect_children(void) session_close_by_pid(s->pid, status); CloseHandle(process); + int WSHELPDelChildToWatch (HANDLE processtowatch); + WSHELPDelChildToWatch (process); // take the process off from watch list in select mux } } } while (i > 0);