소스 검색

KWSys: Enable process tree killing on kFreeBSD

Teach kwsysProcessKill to identify processes on this platform using the "ps"
command just as on Linux.  Patch from Modestas Vainius <[email protected]>.
See issue #10432.
Brad King 15 년 전
부모
커밋
1560d9dcca
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Source/kwsys/ProcessUNIX.c

+ 2 - 1
Source/kwsys/ProcessUNIX.c

@@ -2373,7 +2373,8 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
    Here we define the command to call on each platform and the
    corresponding parsing format string.  The parsing format should
    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__)
 # define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
 # define KWSYSPE_PS_FORMAT  "%d %d\n"
 #elif defined(__hpux) || defined(__sun__) || defined(__sgi) || defined(_AIX) \