Skip to content
Snippets Groups Projects
  1. 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
  2. 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
  3. 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
  4. Jul 07, 2015
  5. Jul 02, 2015
  6. Jun 15, 2015
  7. Jun 03, 2015
  8. May 27, 2015
    • Brad King's avatar
      SystemTools: Teach RemoveFile to tolerate missing file · 61e0419f
      Brad King authored
      Some use cases may have a race condition such that the file to be
      removed disappears before we remove it.  Detect when removal fails due
      to the file already missing and tolerate it without failing.
      
      On Windows this requires using DeleteFileW instead of _wunlink because
      the latter does not seem to always update errno.  Try to delete before
      checking permissions because getting permissions will fail if the file
      is missing.
      
      Change-Id: If1922a15d742daca6d252c594284800d60cc1fce
      61e0419f
  9. May 18, 2015
    • Matt McCormick's avatar
      cmake: Set CMP0056 to NEW · 9a6b7c3f
      Matt McCormick authored
      When Android is compiled with "-static" in CMAKE_EXE_LINKER_FLAGS, only the
      shared version of libc has utimensat.  By setting CMP0056 to NEW,
      CMAKE_EXE_LINKER_FLAGS is passed to the try_compile in KWSYS_PLATFORM_CXX_TEST
      so KWSYS_CXX_HAS_UTIMENSAT gets the correct result.
      
      Change-Id: Ia5ff7abaafb92e043927b57c5f2858259195235f
      9a6b7c3f
  10. May 12, 2015
  11. 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
  12. May 04, 2015
  13. Apr 19, 2015
    • Brad King's avatar
      Glob: Add explicit assignment operator to Message member · 4f39791b
      Brad King authored
       Glob.hxx:58:5: warning: definition of implicit copy assignment operator
        for 'Message' is deprecated because it has a user-declared copy
        constructor [-Wdeprecated]
           Message(const Message& msg) :
           ^
      
      Change-Id: Id6d28d9e5b4ed556556a5add10881f1bcd4525b7
      4f39791b
  14. Apr 16, 2015
    • Brad King's avatar
      Tell Git to export '.gitattributes' · 1ea01a46
      Brad King authored
      Since we do not package the KWSys source tree directly and always
      merge snapshots of its content into other project subtrees, we
      should carry the .gitattributes file into the other projects to
      that the attributes apply in their source trees too.
      
      Change-Id: I039b151443486d24ff798fa0c677b62620cec0b7
      1ea01a46
  15. Apr 10, 2015
  16. Mar 18, 2015
  17. Mar 17, 2015
  18. Mar 10, 2015
  19. Mar 03, 2015
    • Domen Vrankar's avatar
      Glob: Add support for directory listing · 4890f30c
      Domen Vrankar authored and Brad King's avatar Brad King committed
      Glob now supports listing of directories in recursive mode and disabling
      listing of directories in non recursive mode.  In recursive mode when
      directory listing is enabled directory symlinks are also listed.  For
      backward compatibility there is a separate flag for recursive and
      non-recursive globbing mode as this functionality was previously
      inconsistent.
      
      Change-Id: I6099c0c568a04caf7c9a36a5d476390371115790
      4890f30c
    • Domen Vrankar's avatar
      Glob: Handle symlink cycles in directory paths · 5d6204e9
      Domen Vrankar authored and Brad King's avatar Brad King committed
      Prevent cyclic recursion of type "a/b/c -> a" when glob recurse is used
      with follow symlinks so that each directory symbolic link is traversed
      only once and skipped on revisit.
      
      Change-Id: I6f52489198d692c3c0b0d94986db0e664d050342
      5d6204e9
  20. Feb 27, 2015
  21. Feb 25, 2015
    • Domen Vrankar's avatar
      Glob: Remove addition of extra '/' · 1b75ad3d
      Domen Vrankar authored and Brad King's avatar Brad King committed
      When globing non recursive with for example '/a/*/*' the result
      contained '//' instead of a single slash between directories.
      
      Change-Id: I6adb672cde6e327c8fda6e29ff7d3b8ae5c7cb6b
      1b75ad3d
    • Domen Vrankar's avatar
      Glob: Remove dead code · 7c9a970a
      Domen Vrankar authored and Brad King's avatar Brad King committed
      In RecurseDirectory and ProcessDirectory a "fullname" variable is
      computed but not used.  Remove it altogether.
      
      Change-Id: I97493f7a34f1a600715c8301ccd6377c3422212f
      7c9a970a
  22. Feb 24, 2015
  23. Jan 23, 2015
  24. Jan 20, 2015
  25. Jan 09, 2015
    • Ben Boeckel's avatar
      Add missing malloc return value casts · 425fa73e
      Ben Boeckel authored and Brad King's avatar Brad King committed
      Clang 3.5.0 errors out on the implicit void* -> T* cast.
      
      Change-Id: Ie0b0dd25a32e1a5692900d9f1035a423a056c413
      425fa73e
    • Stephen Kelly's avatar
      Workaround SolarisStudio bug with libstdc++. · d30c9b03
      Stephen Kelly authored and Brad King's avatar Brad King committed
      Using iostream and cxxabi.h together causes a compile failure
      
       .../CC-gcc/include/c++/4.8.2/cxxabi.h", line 131: Error: Only one of a
       set of overloaded functions can be extern "C".
      
      See https://community.oracle.com/thread/3644901 for details.
      
      This only happens if the iostream include is before the cxxabi include.
      
      The available solutions are: re-order the includes in
      SystemInformation.cxx, skip the test for KWSYS_CXX_HAS_CXXABI, or cause
      it to fail by adding the include.  Do the latter for now.
      
      Change-Id: Ia1a6a6fca12eb9a42f4a4be5252f22fb6e74a318
      d30c9b03
    • Stephen Kelly's avatar
      SystemTools: Fix build with SunCC/stlport. · af86ac7d
      Stephen Kelly authored and Brad King's avatar Brad King committed
      The <fcntl.h> header needs to be included before <string> is included
      when using stlport. Otherwise:
      
      "SystemTools.cxx", line 1240: Error: UTIME_OMIT is not defined.
      "SystemTools.cxx", line 1240: Error: UTIME_NOW is not defined.
      "SystemTools.cxx", line 1241: Error: AT_FDCWD is not defined.
      
      Change-Id: I3441ae3a7007c53ad97dea42ec48fedca8cc010c
      af86ac7d
    • Stephen Kelly's avatar
      SystemTools: Refactor selection of Windows directory APIs · e4fe1d1a
      Stephen Kelly authored and Brad King's avatar Brad King committed
      Change-Id: I08ee07db55b21ab886658d2ae50a82775180f037
      e4fe1d1a
  26. Jan 08, 2015
  27. Dec 23, 2014
Loading