1. 16 Aug, 2010 2 commits
  2. 09 Jul, 2010 1 commit
    • Brad King's avatar
      KWSys: Avoid undefined behavior in Process crash tests · fe4ee7da
      Brad King authored
      Clang is smart enough to recognize that "*(int*)0=0" invokes undefined
      behavior, warns, and produces an "undefined instruction".  The message
      in commit "Avoid Clang optimizer bug in testProcess-[45]" (2010-07-02)
      is incorrect; this is not a Clang bug.  It really is undefined
      behavior.  Use "*(int*)1=0" to produce a crash instead.
      fe4ee7da
  3. 02 Jul, 2010 1 commit
    • Brad King's avatar
      KWSys: Avoid Clang optimizer bug in testProcess-[45] · 01bb687d
      Brad King authored
      Clang's optimizer, as of clang version 2.8 (trunk 107463), produces the
      undefined instruction 'ud2' for the code "*(int*)0=0" on OS X x86_64.
      It causes our crash tests to fail because the child process exits with
      an invalid instruction instead of a segmentation fault.  Work around the
      bug by using "*(int*)1=0" in this case.
      01bb687d
  4. 30 Jun, 2010 2 commits
  5. 29 Jun, 2010 2 commits
  6. 11 Jun, 2010 2 commits
  7. 10 Jun, 2010 1 commit
    • Brad King's avatar
      KWSys: Configure DynamicLoader library prefix/suffix · 335447fb
      Brad King authored
      The DynamicLoader::LibPrefix and DynamicLoader::LibExtension methods
      previously hard-coded the module name components for each platform.  Set
      them from the CMAKE_SHARED_MODULE_PREFIX and CMAKE_SHARED_MODULE_SUFFIX
      CMake variables instead.  This ensures consistency in a program that
      uses these methods to construct the file names for its own modules.
      335447fb
  8. 04 Jun, 2010 1 commit
    • Brad King's avatar
      KWSys: Remove "copyPermissions" parameters · a0480e22
      Brad King authored
      The CopyFileIfDifferent, CopyFileAlways, CopyAFile and CopyADirectory
      methods should always copy permissions.  The special cases in which a
      caller would pass copyPermissions=false should be handled at the call
      site.  The parameter needlessly complicates the interface and semantics
      of these methods.
      a0480e22
  9. 03 Jun, 2010 1 commit
    • Brad King's avatar
      KWSys: Avoid stat in CopyFileAlways (#10790) · 8d521366
      Brad King authored
      On Windows 7 the file size reported by 'stat' on a new file sometimes
      reports zero even though the real size is correct.  This causes our
      CopyFileAlways method to falsely detect copy failure.  Work around the
      problem by trusting the state of ofstream after writing the file.
      8d521366
  10. 12 May, 2010 1 commit
  11. 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.
      edae70c0
  12. 04 May, 2010 1 commit
  13. 29 Apr, 2010 1 commit
  14. 28 Apr, 2010 1 commit
  15. 19 Apr, 2010 2 commits
  16. 09 Apr, 2010 1 commit
  17. 26 Mar, 2010 1 commit
  18. 22 Mar, 2010 1 commit
  19. 18 Mar, 2010 1 commit
  20. 12 Feb, 2010 1 commit
    • Brad King's avatar
      Fix KWSYS_PLATFORM_INFO_TEST when user removes tree · 0d3fdf45
      Brad King authored
      In commit 'Create KWSYS_PLATFORM_INFO_TEST macro' (2009-11-20) we
      implemented the macro to use a cache entry to avoid re-running the
      try_compile().  However, the output copied from the try_compile is
      needed on every configure.  If the user wipes out the build tree but not
      the cache file then the try_compile() will not re-run to recreate the
      needed file.  We address the problem by teaching the macro to run the
      try_compile() whenever its output file does not exist.
      0d3fdf45
  21. 27 Jan, 2010 1 commit
    • Brad King's avatar
      KWSys: Remove $Id$ from MD5.c · a6c63369
      Brad King authored
      This CVS keyword was copied into the file with the rest of the
      implementation.  It has no meaning outside its original project tree.
      a6c63369
  22. 26 Jan, 2010 1 commit
  23. 13 Jan, 2010 1 commit
    • Brad King's avatar
      KWSys: Fix SharedForward on Cygwin without -mwin32 · ba32af99
      Brad King authored
      When building on Cygwin without -mwin32, the _WIN32 macro may not be
      defined.  SharedForward must still set the PATH environment variable to
      ensure runtime dependencies are found.
      
      The 'ldd' wrapping feature uses 'cygcheck' for now since a real ldd tool
      is not available in Cygwin 1.5.  We can change to use the real ldd when
      we choose to stop supporting legacy Cygwin and require 1.7.
      ba32af99
  24. 12 Jan, 2010 1 commit
  25. 06 Jan, 2010 2 commits
  26. 16 Dec, 2009 1 commit
    • Brad King's avatar
      KWSys: Improve SharedForward platform table · ff91094c
      Brad King authored
      The SharedForward header contains a preprocessor table mapping from
      platform to equivalents for ldd and LD_LIBRARY_PATH.  This commit fixes
      the table preprocessor directives to guarantee at most one platform.
      This generalizes the commit "Fix compilation of VTK on debian/sparc".
      ff91094c
  27. 15 Dec, 2009 1 commit
    • Brad King's avatar
      KWSys: Build tests after libraries · b44279ff
      Brad King authored
      The TestSharedForward executable and TestDynload module do not actually
      link to a KWSys library, but it is nice to build them after the
      libraries just like all other test binaries.
      
      This also works around a universal binary bug in Xcode 2.x.  It forgets
      to create the output directory for the executable before linking it.  We
      avoid the problem by putting the library in the directory first.
      b44279ff
  28. 11 Dec, 2009 1 commit
    • David Cole's avatar
      Add fallback for detecting CPU speed from Windows registry on builds where... · b4b52847
      David Cole authored
      Add fallback for detecting CPU speed from Windows registry on builds where USE_ASM_INSTRUCTIONS gets defined to 0. (Win64 builds.) Clean up methods to return false when not implemented or when they fail to detect the things they're supposed to detect. This file still needs a lot more work to have a fully working implementation on Win64 builds. Committing it now because it's slightly better than it was, and there is a need for the CPU speed detection code in projects that depend on kwsys. Will file a bug shortly to request that the missing implementations get filled in...
      b4b52847
  29. 08 Dec, 2009 1 commit
    • Brad King's avatar
      KWSys: Remove default exe output path · da455f09
      Brad King authored
      KWSys should not set variables outside its namespace.  It can honor the
      EXECUTABLE_OUTPUT_PATH set by a host project, but tere is no need for it
      to set a default in the host project cache.
      da455f09
  30. 01 Dec, 2009 2 commits
    • 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
      b9b9aeda
    • Brad King's avatar
      KWSys: Use "ps -Af" for process list on QNX · 5f7195d1
      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
      5f7195d1
  31. 30 Nov, 2009 2 commits
    • Brad King's avatar
      KWSys: Fix process tree kill on 64-bit Windows · b8b6840c
      Brad King authored
      We enumerate processes to identify those whose parent is being killed so
      that we can recursively kill the children.  Enumeration uses the
      Process32(First|Next) windows API functions, which accept PROCESSENTRY32
      objects to be filled.  This commit corrects the declaration of the entry
      structure to account for its size on 64-bit Windows.
      b8b6840c
    • Brad King's avatar
      KWSys: Restore SIGSTOP/SIGKILL to end process tree · 2988287a
      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.
      2988287a
  32. 24 Nov, 2009 1 commit