[Twisted-Python] What is the "Twisted" way to kill stuck child process

Glyph Lefkowitz glyph at twistedmatrix.com
Thu Feb 12 22:20:34 EST 2004


On Thu, 2004-02-12 at 11:50, Jp Calderone wrote:

>   I'm not certain of the status of spawnProcess on Windows.  If it really
> doesn't work, I suppose popen2 is about all you can do.
> 
>   Since you're mainly developing on Windows, I doubt I can offer much more
> assistance, having never written any multiprocess Windows apps.
> 
>   If popen2 lets you get PIDs on Windows, and os.kill() works with those
> PIDs on Windows, I think you should still be able to timeout processes
> fairly easily.  If they don't, maybe someone with more Windows experience
> can chime in.

If you want to use spawnProcess on windows, you must use the win32
reactor.  This has some limiting effects (but then, so does windows
itself).  Don't use popen2 with Twisted - the SIGCHLD handler that
twistd installs will cause conflicts and crashes.






More information about the Twisted-Python mailing list