killing child processes
Brian Kelley
bkelley at wi.mit.edu
Wed Apr 9 11:42:20 EDT 2003
A partial answer to your question. If you have their PID (process
handles) then you can delete a windows process using
win32process.TerminateProcess(pid, 0)
# start the process
hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(...)
# sometime later
win32process.TerminateProcess(hProcess, 0)
For more info look here...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/terminateprocess.asp
reinhard wrote:
> I've created a process (some batchfile) which in turn creates some
> long running child processes using the win32api CreateProcess call
> (declaring them as a group).
>
> Is there a way to terminate (kill) all the child processes in the
> group?
>
> - reinhard nadrchal
More information about the Python-list
mailing list