[Twisted-Python] spawnProcess and when to kill

黄 轶明 hoooooosety at gmail.com
Tue Nov 27 08:59:31 EST 2012

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

I thought the subprocess will be killed which is not.

What's wrong with my code? Thanks!

Regards, Huang

黄 轶明
mail: hoooooosety at gmail.com
phone: 18620129285

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20121127/fdb0ba48/attachment.htm 

More information about the Twisted-Python mailing list