1. 03 Jan, 2018 1 commit
  2. 01 Nov, 2017 1 commit
  3. 11 Oct, 2017 1 commit
    • Wouter Klouwen's avatar
      ProcessUNIX: Use monotonic clock in kwsysProcessTimeGetCurrent() for POSIX · 749b7506
      Wouter Klouwen authored
      While a process is running, it is possible for other processes such as
      NTP to alter the system clock in large jumps.
      To make the measurement of how long a process has taken to run
      impervious to such large jumps it is helpful to use a monotonic clock.
      This is a clock that takes an arbitrary starting point that does not
      clock_gettime() is a POSIX method that implements this clock. This is
      not available on all platforms, so this commit adds a check for its
      presence. If the monotonic timer is available, use that in
      kwsysProcessTimeGetCurrent(), otherwise falls back to previous
      non-monotonic behaviour.
  4. 07 Oct, 2017 1 commit
  5. 06 Oct, 2017 1 commit
  6. 05 Oct, 2017 2 commits
  7. 22 Jul, 2017 1 commit
  8. 15 May, 2017 2 commits
  9. 06 May, 2017 1 commit
  10. 04 Nov, 2016 3 commits
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      Kitware Robot authored
      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's avatar
      Simplify KWSys per-source license notices · c41c1bc4
      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's avatar
      Sort includes to stabilize include order w.r.t. clang-format · 15e90a3c
      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
  11. 09 Mar, 2016 1 commit
  12. 22 Feb, 2016 1 commit
    • Zack Galbreath's avatar
      Process: Allow timeout to be changed after child starts · 4847aedd
      Zack Galbreath authored
      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
  13. 08 Jan, 2016 1 commit
  14. 01 Dec, 2015 1 commit
  15. 22 Jul, 2015 1 commit
    • James Johnston's avatar
      Process: Fix leaked file descriptor in ProcessUNIX · 52874e6a
      James Johnston authored
      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
  16. 15 Jul, 2015 3 commits
    • James Johnston's avatar
      Process: Added initial support for process groups. · ef517b19
      James Johnston authored
      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
    • James Johnston's avatar
      Process: Wait for children to terminate on Ctrl+C. · faff2ab0
      James Johnston authored
      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
    • James Johnston's avatar
      Process: Remove trailing whitespace in ProcessUNIX.c · 4cd8846c
      James Johnston authored
      Change-Id: I821de08dd10b5f1f4af6287a5d7dc6e03e2c1e78
  17. 05 May, 2015 2 commits
    • 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
    • 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
  18. 09 Jan, 2015 1 commit
  19. 07 Aug, 2014 1 commit
    • 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
  20. 19 May, 2014 1 commit
    • 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
  21. 03 Dec, 2013 1 commit
    • 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
  22. 21 Mar, 2013 1 commit
  23. 25 Jan, 2013 1 commit
  24. 11 Jan, 2013 1 commit
  25. 06 Jan, 2013 1 commit
  26. 06 Oct, 2012 1 commit
  27. 11 Jun, 2010 2 commits
  28. 11 May, 2010 1 commit
    • 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.
  29. 19 Apr, 2010 1 commit
  30. 18 Mar, 2010 1 commit
  31. 12 Jan, 2010 1 commit
  32. 01 Dec, 2009 1 commit
    • 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