- Jul 22, 2017
-
-
jdavidberger authored
Some systems / tools don't play nicely with how select is used here.
-
- May 15, 2017
-
-
When running a pipeline of child processes, provide clients a way to get individual results.
-
-
- May 06, 2017
-
-
Ben Boeckel authored
-
- Nov 04, 2016
-
-
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
-
Brad King authored
Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace KWSys per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing#kwsys". Run the `filter-notices.bash` script to perform the replacements mechanically. Manually fix up the shebang line in one file. Change-Id: I8497f7c868664dcf54a8608ab302ad93c860b334
-
Brad King authored
The clang-format tool sorts `#include` lines within contiguous blocks. Separate blocks with blank lines and sort the include lines within them so that clang-format does not re-order anything. Change-Id: I96d6828f470b9a234464972172d46afab322487c
-
- Mar 09, 2016
-
-
Change-Id: I7d588cb060ea17ed4221c55b866cbbebab983e3c
-
- Feb 22, 2016
-
-
Recompute `TimeoutTime` after `Timeout` changes so that one may modify the timeout of a process after it has started running by calling the normal `kwsysProcess_SetTimeout` method. Change-Id: I460a02d0d3c5f107b844abb56e39f5c844e7e3fb
-
- Jan 08, 2016
-
-
Robert Maynard authored
The ICC frontend on OSX is clang, and therefore the "__clang__" define exists, but it doesn't support the clang diagnostic pragma syntax. Change-Id: I6947bd22c77af8066b85a6b00be7cf6019e7d06e
-
- Dec 01, 2015
-
-
Microseconds range from 0 to 999999, so 1000000 is an overflow which should be processed as well. Change-Id: I59873504987d6aa416e87aa7f5cd208983217ace
-
- Jul 22, 2015
-
-
kwsysProcess leaked a file descriptor every time a process would start. This was causing exhaustion of available file descriptors on some operating systems (e.g. Mac OS X). Change-Id: I78eed0755f9766065c36460ffab468b2d7d1df12
-
- Jul 15, 2015
-
-
kwsysProcess_SetOption now allows you to specify a new kwsysProcess_Option_CreateProcessGroup option, which creates the process in a new process group (Windows/UNIX) and a new session (UNIX). Child process groups receive signals separately from their parents. This allowed for the introduction of the new kwsysProcess_Interrupt function, which allows one to safely request the child process in its own group to terminate. The Ctrl+C handler also manually sends that signal to child process groups, since it's no longer automatic. Change-Id: Id0a420ad65f1b1c1d299ac0eb95fbb8b50a52409
-
The following applies to any KWSys console app on Windows or UNIX (e.g. cmake.exe): The default behavior of such an app when Ctrl+C is pressed is to call ExitProcess or _exit. If the user has a subprocess open (e.g. by way of cmake --build) when this happens, the subprocess will be orphaned because the kwsys-based program will immediately exit. This can lead to odd behavior such as the orphaned subprocess continuing to run and mix output with the operating system shell. We prevent this behavior on Windows by tracking all subprocesses and waiting for their termination when Ctrl+C is pressed before allowing the call to ExitProcess to proceed. On UNIX, we reap every single child process and then call _exit. Change-Id: Iebd2eedb1c06719e9797dd5b1309d473145476a8
-
Change-Id: I821de08dd10b5f1f4af6287a5d7dc6e03e2c1e78
-
- May 05, 2015
-
-
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
-
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
-
- Jan 09, 2015
-
-
Clang 3.5.0 errors out on the implicit void* -> T* cast. Change-Id: Ie0b0dd25a32e1a5692900d9f1035a423a056c413
-
- Aug 07, 2014
-
-
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
-
- May 19, 2014
-
-
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
-
- Dec 03, 2013
-
-
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
-
- Mar 21, 2013
-
-
The Single UNIX (R) Specification, Version 2 defines "FD_SETSIZE", but does not specify the effects if it's (re)defined by an application. Cygwin's newlib headers document that FD_SETSIZE may be defined by the user [1] and should be >= NOFILE. [2] Setting it to 16384 uses a value from Cygwin's poll() implementation. [3] [1]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/include/sys/types.h?cvsroot=src [2]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/sys/param.h?cvsroot=src [3]: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/poll.cc?cvsroot=src Change-Id: Idc43fc28a398979da1e9289e1080a9fc1090c605
-
- Jan 25, 2013
-
-
Change-Id: I4e44d61c175e1deb4cecdebfdba5fa05cbdd1e6b
-
- Jan 11, 2013
-
-
Brad King authored
Change-Id: I55506c112cfffdb8d56a85bae0eeaae91d4035bf
-
- Jan 06, 2013
-
-
Rolf Eike Beer authored
Change-Id: I881521d84a31b6b1c68930f94acbcea88b5c1dea
-
- Oct 06, 2012
-
-
Change-Id: Ic1dcd37dabbf34ce721b81c6a787dafe758105a4
-
- Jun 11, 2010
- May 11, 2010
-
-
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.
-
- Apr 19, 2010
-
-
Brad King authored
Patch from Chuck Atkins <chuck.atkins@kitware.com>
-
- Mar 18, 2010
-
-
Brad King authored
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.
-
- Jan 12, 2010
-
-
Brad King authored
Open output files with mode 0666 so that permissions are not more strict than umask permits. See issue #10126.
-
- Dec 01, 2009
-
-
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
-
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
-
- Nov 30, 2009
-
-
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.
-
- Oct 19, 2009
-
-
Alexander Neundorf authored
Alex
-
- Sep 28, 2009
-
-
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.
-
- Jul 13, 2009
-
-
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.
-
- Jun 12, 2009
-
-
Brad King authored
This helps avoid fixing VMS-specific code for non-VMS compilers where it isn't needed anyway.
-
Francois Bertel authored
COMP:Fixed warning with gcc 4.3.3: passing argument 1 of kwsysProcessSetVMSFeature discards qualifiers from pointer target type.
-