Commit 5f7195d1 authored by Brad King's avatar Brad King
Browse files

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
parent b8b6840c
......@@ -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"
......
......@@ -15,7 +15,7 @@
SET(KWSYS_DATE_STAMP_YEAR 2009)
# KWSys version date month component. Format is MM.
SET(KWSYS_DATE_STAMP_MONTH 11)
SET(KWSYS_DATE_STAMP_MONTH 12)
# KWSys version date day component. Format is DD.
SET(KWSYS_DATE_STAMP_DAY 30)
SET(KWSYS_DATE_STAMP_DAY 01)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment