diff --git a/ProcessUNIX.c b/ProcessUNIX.c index faeb9679366acc3ce7fe5affc1fc6f28981007ad..241e2957380bb4dfb5b21621fdaf38905aa84c84 100644 --- a/ProcessUNIX.c +++ b/ProcessUNIX.c @@ -2413,6 +2413,12 @@ static void kwsysProcessKill(pid_t process_id) /* Suspend the process to be sure it will not create more children. */ kill(process_id, SIGSTOP); +#if defined(__CYGWIN__) + /* Some Cygwin versions seem to need help here. Give up our time slice + so that the child can process SIGSTOP before we send SIGKILL. */ + usleep(1); +#endif + /* Kill all children if we can find them. */ #if defined(__linux__) || defined(__CYGWIN__) /* First try using the /proc filesystem. */