Skip to content
Snippets Groups Projects
  1. May 31, 2018
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · 828b6837
      Kitware Robot authored and Brad King's avatar Brad King committed
      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 6.0.
      
      * 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.
      828b6837
  2. Jan 03, 2018
  3. Nov 01, 2017
  4. Oct 11, 2017
    • 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
      change.
      
      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.
      749b7506
  5. Oct 07, 2017
  6. Oct 06, 2017
  7. Oct 05, 2017
  8. Jul 22, 2017
  9. May 15, 2017
  10. May 06, 2017
  11. Nov 04, 2016
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      Kitware Robot authored and Brad King's avatar Brad King committed
      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
      6c973b46
    • 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
      c41c1bc4
    • 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
      15e90a3c
  12. Mar 09, 2016
  13. Feb 22, 2016
  14. Jan 08, 2016
  15. Dec 01, 2015
  16. Jul 22, 2015
    • James Johnston's avatar
      Process: Fix leaked file descriptor in ProcessUNIX · 52874e6a
      James Johnston authored and Brad King's avatar Brad King committed
      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
      52874e6a
  17. Jul 15, 2015
    • James Johnston's avatar
      Process: Added initial support for process groups. · ef517b19
      James Johnston authored and Brad King's avatar Brad King committed
      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
      ef517b19
    • James Johnston's avatar
      Process: Wait for children to terminate on Ctrl+C. · faff2ab0
      James Johnston authored and Brad King's avatar Brad King committed
      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
      faff2ab0
    • James Johnston's avatar
      Process: Remove trailing whitespace in ProcessUNIX.c · 4cd8846c
      James Johnston authored and Brad King's avatar Brad King committed
      Change-Id: I821de08dd10b5f1f4af6287a5d7dc6e03e2c1e78
      4cd8846c
  18. 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
  19. Jan 09, 2015
  20. 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
  21. 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
  22. 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
  23. Mar 21, 2013
  24. Jan 25, 2013
  25. Jan 11, 2013
  26. Jan 06, 2013
  27. Oct 06, 2012
  28. Jun 11, 2010
  29. 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
  30. Apr 19, 2010
  31. Mar 18, 2010
  32. Jan 12, 2010
Loading