[Cmake-commits] [cmake-commits] king committed ProcessWin32.c 1.71 1.72
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 30 16:30:21 EST 2009
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv14712/Source/kwsys
Modified Files:
ProcessWin32.c
Log Message:
KWSys: Fix process tree kill on 64-bit Windows
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.
Index: ProcessWin32.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/ProcessWin32.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -C 2 -d -r1.71 -r1.72
*** ProcessWin32.c 28 Sep 2009 15:37:22 -0000 1.71
--- ProcessWin32.c 30 Nov 2009 21:30:19 -0000 1.72
***************
*** 2517,2520 ****
--- 2517,2525 ----
/* Toolhelp32 API definitions. */
#define TH32CS_SNAPPROCESS 0x00000002
+ #if defined(_WIN64)
+ typedef unsigned __int64 ProcessULONG_PTR;
+ #else
+ typedef unsigned long ProcessULONG_PTR;
+ #endif
typedef struct tagPROCESSENTRY32 PROCESSENTRY32;
typedef PROCESSENTRY32* LPPROCESSENTRY32;
***************
*** 2524,2528 ****
DWORD cntUsage;
DWORD th32ProcessID;
! DWORD th32DefaultHeapID;
DWORD th32ModuleID;
DWORD cntThreads;
--- 2529,2533 ----
DWORD cntUsage;
DWORD th32ProcessID;
! ProcessULONG_PTR th32DefaultHeapID;
DWORD th32ModuleID;
DWORD cntThreads;
More information about the Cmake-commits
mailing list