Skip to content
Snippets Groups Projects
  1. May 05, 2015
    • Brad King's avatar
      Process: Add option to merge stdout/stderr · 34fceb50
      Brad King authored
      When enabled, ignore all stderr pipe configuration options and
      just give the child a copy of stdout as its stderr.
      
      Change-Id: I87a64657cc701b706da78f7bfc56ad0071383372
      34fceb50
    • Brad King's avatar
      Process: Refactor child pipe creation · 8c8b2273
      Brad King authored
      Consolidate logic to prepare stdin/stdout/stderr in the same way
      before starting any processes.  This will simplify alternative
      approaches to select the child pipes.
      
      Change-Id: I36175a8cfc2578543103297420908a539ad71a3a
      8c8b2273
  2. Jan 09, 2015
  3. Aug 07, 2014
    • Brad King's avatar
      Add assert() to quiet Clang scan-build warnings · 4d526097
      Brad King authored
      In ProcessUNIX.c, testProcess.c, and testCommandLineArguments1.cxx, add
      assert() calls to tell Clang scan-build that we do not expect certain
      pointers to be NULL.
      
      Change-Id: I4a2b035cf58198606b4698c9d0e2048a66f15fd0
      4d526097
  4. May 19, 2014
    • Brad King's avatar
      Process: Workaround child kill trouble on Cygwin · c282e64f
      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.
      
      Change-Id: I75ab55cf969a0ea6104a9798c761c0ba1fcd1dbc
      c282e64f
  5. Dec 03, 2013
    • Rolf Eike Beer's avatar
      ProcessUNIX: close /proc entry before starting recursion · b2fd7da5
      Rolf Eike Beer authored
      If a group of processes needs to be terminated recursively the entry in /proc
      doesn't need to be kept open during the recursion as all the interesting
      information was already read from it. Especially in case of deeper recursion
      this lowers the memory pressure.
      
      Change-Id: I95b969f42c8dd68b57cdaf8fc1b705f358f1dc58
      b2fd7da5
  6. Mar 21, 2013
  7. Jan 25, 2013
  8. Jan 11, 2013
  9. Jan 06, 2013
  10. Oct 06, 2012
  11. Jun 11, 2010
  12. May 11, 2010
    • Brad King's avatar
      KWSys: Process tree kill for kFreeBSD, GNU/Hurd · edae70c0
      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.
      edae70c0
  13. Apr 19, 2010
  14. Mar 18, 2010
  15. Jan 12, 2010
  16. Dec 01, 2009
    • Brad King's avatar
      KWSys: List processes with "ps -ef" on OpenSolaris · b9b9aeda
      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
      b9b9aeda
    • Brad King's avatar
      KWSys: Use "ps -Af" for process list on QNX · 5f7195d1
      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
      5f7195d1
  17. Nov 30, 2009
    • Brad King's avatar
      KWSys: Restore SIGSTOP/SIGKILL to end process tree · 2988287a
      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.
      2988287a
  18. Oct 19, 2009
  19. Sep 28, 2009
    • Brad King's avatar
      Convert KWSys to OSI-approved BSD License · 62db264e
      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.
      62db264e
  20. Jul 13, 2009
    • Brad King's avatar
      ENH: Provide unix-sytle command line parsing · e4e7f37c
      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.
      e4e7f37c
  21. Jun 12, 2009
  22. Jun 10, 2009
    • Brad King's avatar
      ENH: Teach KWSys Process basic VMS support · 48d72f12
      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.
      48d72f12
    • Brad King's avatar
      BUG: Fix non-select process impl without timeout · 6eac6c06
      Brad King authored
      This avoids use of an uninitialized value in the KWSys ProcessUNIX
      polling implementation when no timeout is given.
      6eac6c06
  23. Apr 23, 2009
  24. Mar 16, 2009
  25. Dec 15, 2008
  26. Sep 22, 2008
  27. Sep 15, 2008
  28. Aug 20, 2008
    • Brad King's avatar
      BUG: Handle case when select() lies · 83f5fa50
      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.
      83f5fa50
  29. May 13, 2008
  30. May 12, 2008
  31. Apr 02, 2008
  32. Jan 10, 2008
  33. Jun 27, 2007
Loading