summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-10-101-13/+7
| | | | | * upstream-KWSys: KWSys 2017-10-10 (239bc737)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-08-111-1/+2
| | | | | * upstream-KWSys: KWSys 2017-08-11 (e1006189)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-05-161-108/+125
| | | | | * upstream-KWSys: KWSys 2017-05-16 (fe1f22ce)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-11-091-1127/+951
| | | | | * upstream-KWSys: KWSys 2016-11-09 (18c65411)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-03-091-0/+11
| | | | | * upstream-KWSys: KWSys 2016-03-09 (36d8666f)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-02-221-0/+2
| | | | | * upstream-KWSys: KWSys 2016-02-22 (4847aedd)
* Merge branch 'upstream-KWSys' into update-kwsysBrad King2016-01-111-2/+2
| | | | | * upstream-KWSys: KWSys 2016-01-11 (e8bf616e)
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-12-011-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-07-311-50/+307
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-05-071-2/+7
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-05-051-162/+193
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2015-01-101-2/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-08-111-0/+2
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2014-05-191-0/+6
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-12-191-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-03-221-0/+6
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-02-011-1/+1
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-01-141-2/+3
|
* Merge branch 'upstream-kwsys' into update-kwsysBrad King2013-01-081-4/+0
|
* Merge branch 'upstream-kwsys' into import-KWSys-subtreeBrad King2012-10-311-0/+1
|
* KWSys: Teach Process to error on empty commandBrad King2010-06-111-0/+8
| | | | | Do not try to execute a child with no command line. Previously this led to a silent hang.
* KWSys: Process tree kill for SolarisBrad King2010-06-111-0/+3
|
* KWSys: Process tree kill for kFreeBSD, GNU/HurdBrad King2010-05-111-1/+1
| | | | | | | | | 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.
* KWSys Process: Add OpenBSD process tree kill supportBrad King2010-04-191-1/+1
| | | | Patch from Chuck Atkins <chuck.atkins@kitware.com>
* KWSys: Enable process tree killing on kFreeBSDBrad King2010-03-181-1/+2
| | | | | | Teach kwsysProcessKill to identify processes on this platform using the "ps" command just as on Linux. Patch from Modestas Vainius <modax@debian.org>. See issue #10432.
* Trust umask for file permissionsBrad King2010-01-121-3/+2
| | | | | Open output files with mode 0666 so that permissions are not more strict than umask permits. See issue #10126.
* KWSys: List processes with "ps -ef" on OpenSolarisBrad King2009-12-011-1/+2
| | | | | | | | | 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
* KWSys: Use "ps -Af" for process list on QNXBrad King2009-12-011-0/+3
| | | | | | | | | 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
* KWSys: Restore SIGSTOP/SIGKILL to end process treeBrad King2009-11-301-7/+15
| | | | | | | | | | | | | | | 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.
* fix two more icpc warnings, ok by Brad (float compared for equality, unused ↵Alexander Neundorf2009-10-191-2/+2
| | | | | | variable) Alex
* Convert KWSys to OSI-approved BSD LicenseBrad King2009-09-281-11/+9
| | | | | | | 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.
* ENH: Provide unix-sytle command line parsingBrad King2009-07-131-256/+3
| | | | | | | 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.
* COMP: Do not compile VMS-specific code on non-VMSBrad King2009-06-121-8/+7
| | | | | This helps avoid fixing VMS-specific code for non-VMS compilers where it isn't needed anyway.
* COMP:Fixed warning with gcc 4.3.3: passing argument 1 of ↵Francois Bertel2009-06-121-3/+3
| | | | kwsysProcessSetVMSFeature discards qualifiers from pointer target type.
* ENH: Teach KWSys Process basic VMS supportBrad King2009-06-101-9/+76
| | | | | | | | | | | | | | 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.
* BUG: Fix non-select process impl without timeoutBrad King2009-06-101-12/+8
| | | | | This avoids use of an uninitialized value in the KWSys ProcessUNIX polling implementation when no timeout is given.
* ENH: check in almost building VMS stuff with VMSBuild directory since the ↵Bill Hoffman2009-04-231-0/+3
| | | | bootstrap script will not work on VMS
* COMP:Try to fix compile error with qnx gcc.Francois Bertel2009-03-161-1/+2
|
* COMP:Fixed gcc 4.3.2 warning with -O1 and above: ignoring return value of ↵Francois Bertel2009-03-161-3/+6
| | | | read'), declared with attribute warn_unused_result
* COMP:Fixed warnings.Francois Bertel2009-03-161-17/+20
|
* COMP:Fixed warnings.Francois Bertel2008-12-151-6/+8
|
* ENH: a few more haiku fixes, stop the debugger from coming up for testsBill Hoffman2008-09-221-0/+4
|
* ENH: add initial support for HAIKU OS from bug# 7425Bill Hoffman2008-09-151-1/+1
|
* BUG: Handle case when select() liesBrad King2008-08-201-7/+10
| | | | | | | 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.
* ENH: all ctype function have the same issue: char can be signed or unsigned, ↵Mathieu Malaterre2008-05-131-1/+1
| | | | since isspace only deal with >=0 value (except EOF) one has to first cast it to unsigned char
* COMP: warning, isprint and isspace take int args.Bill Lorensen2008-05-121-1/+1
|
* STYLE: minor commentsMathieu Malaterre2008-04-021-1/+1
|
* BUG: Fix hang in Process_Kill on OS X caused by an OS bug in which a pipe ↵Brad King2008-01-101-39/+54
| | | | read end cannot be closed if the pipe write end is open, the pipe is full, and another process is blocking waiting to write. Work around the problem by killing the children before closing the pipes.
* COMP: Fix for platforms that do not have siginfo on their signal handlers.Brad King2007-06-271-2/+2
|
* BUG: Do not send both SIGSTOP and SIGKILL when killing a process. The ↵Brad King2007-05-161-5/+7
| | | | SIGSTOP seems to be able to block the SIGKILL occasionally. Also the SIGKILL is sufficient since the process table entry will still exist until it is reaped with waitpid.