Browse Source

KWSys: Process tree kill for Solaris

Brad King 15 năm trước cách đây
mục cha
commit
60478de3e5
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Source/kwsys/ProcessUNIX.c

+ 3 - 0
Source/kwsys/ProcessUNIX.c

@@ -2377,6 +2377,9 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
    || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
 # define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
 # define KWSYSPE_PS_FORMAT  "%d %d\n"
+#elif defined(__sun) && (defined(__SVR4) || defined(__svr4__)) /* Solaris */
+# define KWSYSPE_PS_COMMAND "ps -e -o pid,ppid"
+# define KWSYSPE_PS_FORMAT  "%d %d\n"
 #elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \
    || defined(__sparc)
 # define KWSYSPE_PS_COMMAND "ps -ef"