[Twisted-Python] spawnProcess and kill the child process.

Nov. 27, 2012
2:04 p.m.
hi, all I start a process using spawnProcess and want to kill when my certain Factory stops. something I wrote like these ---------- p = SomeProtocol(ProcessProtocol) reactor.spawnProcess(p, 'twistd', ['twistd', '-y', 'anotherMain.py'], {}) ---------- class Factory(ServerFactory): ... def StopFactory(self): # which is the p above p.transport.signalProcess("KILL") I thought the subprocess will be killed which is not. I tried using p.transport.signalProcess("KILL") some other place, and it works. What's wrong with my code? Thanks! P.S, which is the best way to shut down a twistd, I send the TERM to it now. It just work fine. Regards, Huang
4489
Age (days ago)
4489
Last active (days ago)
0 comments
1 participants
participants (1)
-
holsety huang