summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-03-18 12:43:05 (GMT)
committerBrad King <brad.king@kitware.com>2010-03-18 12:43:05 (GMT)
commit1560d9dcca7312def996022b4702dc739ba2badb (patch)
tree51875cc98dc983260c4d2fa30b40f083b1bdfde8
parentf1d801e4ea2c6996a0f391f382569c552169ae6a (diff)
downloadCMake-1560d9dcca7312def996022b4702dc739ba2badb.zip
CMake-1560d9dcca7312def996022b4702dc739ba2badb.tar.gz
CMake-1560d9dcca7312def996022b4702dc739ba2badb.tar.bz2
KWSys: Enable process tree killing on kFreeBSD
Teach kwsysProcessKill to identify processes on this platform using the "ps" command just as on Linux. Patch from Modestas Vainius <modax@debian.org>. See issue #10432.
-rw-r--r--Source/kwsys/ProcessUNIX.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 373e906..57f7b16 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -2373,7 +2373,8 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
Here we define the command to call on each platform and the
corresponding parsing format string. The parsing format should
have two integers to store: the pid and then the ppid. */
-#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
+ || defined(__FreeBSD_kernel__)
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
# define KWSYSPE_PS_FORMAT "%d %d\n"
#elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \