Skip to content
Snippets Groups Projects
  1. Sep 28, 2015
    • Vitaly Baranov's avatar
      SystemTools: Fix GetPath to not affect existing output vector entries · 2089567a
      Vitaly Baranov authored and Brad King's avatar Brad King committed
      The GetPath method appends paths to an output vector and also converts
      paths to forward slashes.  However, the method should not modify entries
      in the output vector that existed prior to the call.  Fix it to only fix
      slashes in the entries it added to the vector.  Also add a test case
      covering this behavior.
      
      Change-Id: Ie098c3eddbe63ed59f0d393aa6c43ea6c395011d
      2089567a
  2. Sep 25, 2015
    • Domen Vrankar's avatar
      SystemTools: Handle directories in CopyFile{Always,IfDifferent} · dc4e4a55
      Domen Vrankar authored and Brad King's avatar Brad King committed
      Teach these functions to copy directories as directories instead
      of files.  Create the destination directory and set permissions,
      but do not recurse into the directory structure because these
      functions are meant for individual filesystem entries.
      
      Change-Id: I20fae2e159f86285c02c3fd894609e2e51cafdac
      dc4e4a55
  3. Sep 17, 2015
  4. Sep 11, 2015
  5. Aug 28, 2015
  6. Aug 24, 2015
  7. Aug 21, 2015
    • Brad King's avatar
      Pass C++ standard flags to SunPro in standalone build · c8e5d1b2
      Brad King authored
      Pass flags to the SunPro compiler to improve the level of C++ standard
      support beyond the default.  Do this only in a standalone build so that
      host projects can set flags for us.
      
      Change-Id: Ic9a84debfa939caf00b7ad99887793e885c35371
      c8e5d1b2
  8. Aug 07, 2015
  9. Aug 03, 2015
  10. Jul 30, 2015
    • James Johnston's avatar
      Process: Fix error message for startup failure on Windows · f63febb7
      James Johnston authored and Brad King's avatar Brad King committed
      Since commit faff2ab0 (Process: Wait for children to terminate on Ctrl+C,
      2015-06-30) we do not report the GetLastError() from CreateProcessW()
      failure.  Refactor kwsysProcessCleanup to pass the error code in so
      that we can always call GetLastError() immediately after a failure.
      
      Change-Id: I2b7950560c8bde2e29070c87f4927c51dca32e39
      f63febb7
  11. Jul 23, 2015
    • Brad King's avatar
      Process: Fix conversion warning in testProcess.c · 83b4a6b8
      Brad King authored
      Store and pass the interruptDelay parameter as 'unsigned int' so
      it does not have to be converted to pass to testProcess_sleep.
      Otherwise some compilers warn about the signed->unsigned conversion.
      
      Change-Id: I1edf6dbc852231834a5de82c5b14f84ac8018c1f
      83b4a6b8
  12. 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
  13. Jul 15, 2015
    • James Johnston's avatar
      Process: Added test cases for testing Ctrl+C and process groups. · 906c2cae
      James Johnston authored and Brad King's avatar Brad King committed
      Two new tests were added to testProcess:
       * Test 9 is constructed of the root test process, a child process,
         and a grandchild process.  The grandchild ignores all Ctrl+C signals
         and then sleeps.  The child runs the grandchild normally.  The root
         process runs the child in a new process group, sends it a Ctrl+C
         signal, and then lets the process expire to prove that the child was
         blocked waiting for the uninterruptable grandchild to die.
       * Test 10 is constructed of the root test process, a child process,
         and a grandchild process.  The grandchild sleeps and processes
         signals normally.  The child runs the grandchild in a new process
         group.  The root process runs the child in a new process group as
         well, sends it a Ctrl+C, and then verifies that: (1) the child does
         indeed terminate with an interrupt signal, (2) the child did not
         expire, proving that it retransmitted the signal to the sleeping
         grandchild before waiting for the grandchild to terminate.
      
      Change-Id: Iba5bee546a82eb61a41d4194341e9382a00279d4
      906c2cae
    • 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: Refactor sleeping code in testProcess.c. · b1c44c58
      James Johnston authored and Brad King's avatar Brad King committed
      Code for delaying/sleeping has been unified into one location.
      
      Change-Id: I234f3e1be667539e8126f7ed24aec95fe14284b3
      b1c44c58
    • 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
  14. Jul 10, 2015
    • Brad King's avatar
      SystemTools: Optimize GetActualCaseForPath memoization · c9336bcf
      Brad King authored
      Use a case-insensitive map key since paths of all case combinations
      should map to the same actual case.  This may reduce the number
      of copies of each path differing only by case in the map.
      
      Change-Id: Ic5460fcf14fa263d45ef1909bf80a81c6f4791a4
      c9336bcf
    • Brad King's avatar
      SystemTools: Fix GetActualCaseForPath drive letter case handling · 86a24794
      Brad King authored
      Convert the drive letter to upper case in the actual output value
      instead of just our internal memoization map key.  This was broken by
      commit 08b2dcff (Fix GetActualCaseForPath for UNC paths, 2010-08-16).
      
      CMake-Issue: 15642
      Change-Id: Iee7148616370d1be4be052c74b7a5d802ad47d93
      86a24794
  15. Jul 08, 2015
    • Brad King's avatar
      System: Drop Shell_* APIs · d3ba91e1
      Brad King authored
      The shell escaping APIs are very specific to CMake and are not used by
      other KWSys clients.  They are moving to CMake proper, so drop them from
      KWSys.
      
      Change-Id: I422c76f6515d51a352e112828533d6e3fd1a5440
      d3ba91e1
  16. Jul 07, 2015
  17. Jul 02, 2015
Loading