diff options
author | Brad King <brad.king@kitware.com> | 2004-05-06 19:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-05-06 19:34:04 (GMT) |
commit | db4fd2a15d8df861f845b899819b4cce0180e52e (patch) | |
tree | 9b1751199891998d375050b4ee3ea75d9702ab2f /Source/kwsys/ProcessWin32.c | |
parent | 7de6edc6869984af3bbc6cc10abcd917628673cd (diff) | |
download | CMake-db4fd2a15d8df861f845b899819b4cce0180e52e.zip CMake-db4fd2a15d8df861f845b899819b4cce0180e52e.tar.gz CMake-db4fd2a15d8df861f845b899819b4cce0180e52e.tar.bz2 |
ENH: Adding process tree killing for Win32 process execution.
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 05cc89e..582772b 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -14,6 +14,7 @@ #define KWSYS_IN_PROCESS_C #include "kwsysPrivate.h" #include KWSYS_HEADER(Process.h) +#include KWSYS_HEADER(ProcessWin32Kill.h) /* @@ -1403,7 +1404,10 @@ void kwsysProcess_Kill(kwsysProcess* cp) /* Not Windows 9x. Just terminate the children. */ for(i=0; i < cp->NumberOfCommands; ++i) { - TerminateProcess(cp->ProcessInformation[i].hProcess, 255); + if(!kwsysProcessWin32Kill(cp->ProcessInformation[i].dwProcessId)) + { + TerminateProcess(cp->ProcessInformation[i].hProcess, 255); + } } } |