1. 20 May, 2014 1 commit
    • Brad King's avatar
      KWSys Process: Workaround child kill trouble on Cygwin · 0c7f84ca
      Brad King authored
      When we kill a child we send SIGSTOP first so that we can traverse its
      child processes recursively.  On unwinding the recursion we then send
      SIGKILL.  Current Cygwin has trouble when both signals are sent in quick
      succession by the parent process.  Add a usleep(1) after sending the
      first signal to give up our time slice and give Cygwin a chance to
      process the first signal before sending the second.
      0c7f84ca
  2. 11 Jun, 2010 2 commits
  3. 11 May, 2010 2 commits
    • Brad King's avatar
      KWSys: Process tree kill for kFreeBSD, GNU/Hurd · 83d3b1e4
      Brad King authored
      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 <modestas@vainius.eu>".
      See issue #10432.
      83d3b1e4
    • Brad King's avatar
      KWSys: Process tree kill for kFreeBSD, GNU/Hurd · 9c0937f8
      Brad King authored
      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 <modestas@vainius.eu>".
      See issue #10432.
      9c0937f8
  4. 19 Apr, 2010 1 commit
  5. 18 Mar, 2010 1 commit
  6. 28 Jan, 2010 1 commit
  7. 12 Jan, 2010 1 commit
  8. 01 Dec, 2009 2 commits
    • Brad King's avatar
      KWSys: List processes with "ps -ef" on OpenSolaris · 1a5f209e
      Brad King authored
      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
      1a5f209e
    • Brad King's avatar
      KWSys: Use "ps -Af" for process list on QNX · be36c14b
      Brad King authored
      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
      be36c14b
  9. 30 Nov, 2009 1 commit
    • Brad King's avatar
      KWSys: Restore SIGSTOP/SIGKILL to end process tree · b21f1eae
      Brad King authored
      On UNIX systems we kill a tree of processes by performing a DFS walk of
      the tree.  We send SIGSTOP to each process encountered, recursively
      handle its children, and then send SIGKILL.
      
      We once used the above approach in the past, but it was removed by the
      commit "Do not send both SIGSTOP and SIGKILL when killing a process".
      The commit was meant to work-around an OS X 10.3 bug in which the child
      would not always honor SIGKILL after SIGSTOP.  At the time we wrongly
      assumed that the process tree remains intact after SIGKILL and before
      the child is reaped.  In fact the grandchildren may be re-parented to
      ppid=1 even before the child is reaped, which causes the DFS walk to
      miss them.
      b21f1eae
  10. 28 Oct, 2009 1 commit
  11. 19 Oct, 2009 1 commit
  12. 01 Oct, 2009 1 commit
  13. 28 Sep, 2009 1 commit
    • Brad King's avatar
      Convert KWSys to OSI-approved BSD License · de955e4b
      Brad King authored
      This converts the KWSys license to a pure 3-clause OSI-approved BSD
      License.  We drop the previous license clause requiring modified
      versions to be plainly marked.  We also update the KWSys copyright to
      cover the full development time range.
      de955e4b
  14. 13 Jul, 2009 1 commit
    • Brad King's avatar
      ENH: Provide unix-sytle command line parsing · 18e639d4
      Brad King authored
      Add System_Parse_CommandForUnix to the KWSys System interface as a
      utility to parse a unix-style command line.  Move the existing
      implementation out of ProcessUNIX.  Add a flags argument reserved for
      future use in providing additional behavior.
      18e639d4
  15. 12 Jun, 2009 2 commits
  16. 10 Jun, 2009 2 commits
    • Brad King's avatar
      ENH: Teach KWSys Process basic VMS support · 312ca967
      Brad King authored
      This achieves basic process execution on OpenVMS.  We use work-arounds
      for different fork()/exec() behavior and a lack of select().
      
      VMS emulates fork/exec using setjmp/longjmp to evaluate the child and
      parent return cases from fork.  Therefore both must be invoked from the
      same function.
      
      Since select() works only for sockets we use the BeOS-style polling
      implementation.  However, non-blocking reads on empty pipes cannot be
      distinguished easily from the last read on a closed pipe.  Therefore we
      identify end of data by an empty read after the child terminates.
      312ca967
    • Brad King's avatar
      BUG: Fix non-select process impl without timeout · 1eec4fe6
      Brad King authored
      This avoids use of an uninitialized value in the KWSys ProcessUNIX
      polling implementation when no timeout is given.
      1eec4fe6
  17. 23 Apr, 2009 1 commit
  18. 16 Mar, 2009 3 commits
  19. 15 Dec, 2008 1 commit
  20. 22 Sep, 2008 1 commit
  21. 15 Sep, 2008 1 commit
  22. 20 Aug, 2008 1 commit
    • Brad King's avatar
      BUG: Handle case when select() lies · 07665de0
      Brad King authored
      According to "man select" on Linux it is possible that select() lies
      about data being ready on a pipe in some subtle cases.  We deal with
      this by switching to non-blocking i/o and checking for EAGAIN.  See
      issue #7180.
      07665de0
  23. 13 May, 2008 1 commit
  24. 12 May, 2008 1 commit
  25. 02 Apr, 2008 1 commit
  26. 10 Jan, 2008 1 commit
  27. 27 Jun, 2007 1 commit
  28. 16 May, 2007 1 commit
  29. 03 May, 2007 1 commit
  30. 05 Dec, 2006 2 commits
  31. 04 Dec, 2006 1 commit
  32. 04 Oct, 2006 1 commit