summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-12-01 13:10:22 (GMT)
committerBrad King <brad.king@kitware.com>2009-12-01 13:10:22 (GMT)
commitbe36c14bea37e47ead0f6789f8f7a969e51f8829 (patch)
treedd6cdbfe9c65a037e020b073bedad94a40ea4554 /Source/kwsys/ProcessUNIX.c
parentafef52454e72b10c9b3a8d373c5ba66b4acdc067 (diff)
downloadCMake-be36c14bea37e47ead0f6789f8f7a969e51f8829.zip
CMake-be36c14bea37e47ead0f6789f8f7a969e51f8829.tar.gz
CMake-be36c14bea37e47ead0f6789f8f7a969e51f8829.tar.bz2
KWSys: Use "ps -Af" for process list on QNX
In order to kill process trees we need to list all processes to find those whose parent we are killing. We implement process listing on QNX using "ps -Af" and parsing the resulting format: UID PID PPID C STIME TTY TIME CMD %*d %d %d %*[^\n]\n
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r--Source/kwsys/ProcessUNIX.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 2deb2f4..780dc86 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -2380,6 +2380,9 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
#elif defined(__hpux) || defined(__sparc) || defined(__sgi) || defined(_AIX)
# define KWSYSPE_PS_COMMAND "ps -ef"
# define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n"
+#elif defined(__QNX__)
+# define KWSYSPE_PS_COMMAND "ps -Af"
+# define KWSYSPE_PS_FORMAT "%*d %d %d %*[^\n]\n"
#elif defined(__CYGWIN__)
# define KWSYSPE_PS_COMMAND "ps aux"
# define KWSYSPE_PS_FORMAT "%d %d %*[^\n]\n"