Sfoglia il codice sorgente

KWSys: Process tree kill for kFreeBSD, GNU/Hurd

kFreeBSD and Hurd have the same userland as Linux.  This change is
necessary to enable kwsysProcessKill() to kill child processes on
kFreeBSD.  The bug was detected by CTestTestTimeout test.

Patch from "Modestas Vainius <[email protected]>".
See issue #10432.
Brad King 15 anni fa
parent
commit
83d3b1e427
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Source/kwsys/ProcessUNIX.c

+ 1 - 1
Source/kwsys/ProcessUNIX.c

@@ -2374,7 +2374,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
    corresponding parsing format string.  The parsing format should
    corresponding parsing format string.  The parsing format should
    have two integers to store: the pid and then the ppid.  */
    have two integers to store: the pid and then the ppid.  */
 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
-   || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+   || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
 # 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(__sun__) || defined(__sgi) || defined(_AIX) \
 #elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \