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
This commit is contained in:
parent
be36c14bea
commit
1a5f209e62
|
@ -2377,7 +2377,8 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
|
||||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
|
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
|
||||||
# define KWSYSPE_PS_FORMAT "%d %d\n"
|
# 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_COMMAND "ps -ef"
|
||||||
# define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n"
|
# define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n"
|
||||||
#elif defined(__QNX__)
|
#elif defined(__QNX__)
|
||||||
|
|
Loading…
Reference in New Issue