|RE: [cdt-dev] Win32 spawner|
I've been trying to figure out why Spawner.kill() isn't killing a process for us. The "process", in our case, is our debugger engine--a Win32 executable. We use the spawner to launch it, and on shutdown, we sometimes need to abruptly kill it (if it's taking too long to shut down gracefully). Again, calling kill() on the Process object, which is a Spawner, isn't doing the trick.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of John Cortell
Sent: Wednesday, July 16, 2008 4:36 PM
To: CDT General developers list.
Subject: [cdt-dev] Win32 spawner
I found the answer in starter.cpp. It contains a handler which waits for the terminate event-handle to be signaled and then goes about trying to kill the process it earlier created. Problem is: it does so by sending a console CTRL-C event (unless it's a cygwin process, in which case it runs a "kill -SIGTERM" command). In our case, the process is not a cygwin process. The CTRL-C event isn't doing the trick, and I have to wonder...why aren't we just using the TerminateProcess Win32 function? We have the process handle, after all. I've coded it and it's working. I'm just scratching my head wondering why we'd try sending a CTRL-C instead.
Back to the top