summaryrefslogtreecommitdiffstats
path: root/ProcessUNIX.c
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2014-05-19 14:53:51 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-19 14:58:10 (GMT)
commited52685dd7ea5c54e7a5e6caa789293d76f10b15 (patch)
treebb0690652624838d38adba9543853382ca0580d2 /ProcessUNIX.c
parent7762c57405d3b0daefc484a5e07bc24e04701615 (diff)
downloadCMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.zip
CMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.tar.gz
CMake-ed52685dd7ea5c54e7a5e6caa789293d76f10b15.tar.bz2
KWSys 2014-05-19 (c282e64f)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ c282e64f | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 6074f33f..c282e64f Brad King (2): 2e00d252 SystemTools: Port cygwin path conversion to modern API c282e64f Process: Workaround child kill trouble on Cygwin Change-Id: I39a3ca47fbb4065eff922d94e6d7019c417ed75c
Diffstat (limited to 'ProcessUNIX.c')
-rw-r--r--ProcessUNIX.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index faeb967..241e295 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. */