[Python-Dev] os.kill() on Win32 ? (Fork on Win32)

Mark Hammond MarkH@ActiveState.com
Mon, 31 Jul 2000 19:47:14 +1000


> Next, I'll have to find out how to kill a process given
> its process ID under Windows... wouldn't it be possible to

hprocess = OpenProcess( accessFlags, bInherit, pid );
TerminateProcess(hprocess, exitCode);

The hard bit on Win32 is finding the PID when you only have the process
name (for example) but it sounds like you dont have that specific
problem...

Mark.