diff options
author | Brad King <brad.king@kitware.com> | 2009-12-01 13:37:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-12-01 13:37:14 (GMT) |
commit | 1a5f209e625b18c2f23b90f5e123447909a23e1a (patch) | |
tree | 8b0ac0713fbe8c0ec342dce2751e9943d71d5d69 /Source | |
parent | be36c14bea37e47ead0f6789f8f7a969e51f8829 (diff) | |
download | CMake-1a5f209e625b18c2f23b90f5e123447909a23e1a.zip CMake-1a5f209e625b18c2f23b90f5e123447909a23e1a.tar.gz CMake-1a5f209e625b18c2f23b90f5e123447909a23e1a.tar.bz2 |
KWSys: List processes with "ps -ef" on OpenSolaris
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
OpenSolaris by using "ps -ef" and parsing the resulting format:
UID PID PPID C STIME TTY TIME CMD
%*s %d %d %*[^\n]\n
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 780dc86..79716a1 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -2377,7 +2377,8 @@ static pid_t kwsysProcessFork(kwsysProcess* cp, #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) # define KWSYSPE_PS_COMMAND "ps axo pid,ppid" # define KWSYSPE_PS_FORMAT "%d %d\n" -#elif defined(__hpux) || defined(__sparc) || defined(__sgi) || defined(_AIX) +#elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \ + || defined(__sparc) # define KWSYSPE_PS_COMMAND "ps -ef" # define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n" #elif defined(__QNX__) |