Search code examples
pythonmultithreadingsubprocesstwisted

How does one make a twistedmatrix subprocess continue processing after the client disconnects?


I`m creating a twisted tcp server that needs to make subprocess command line call and relay the results to the client while still connected. But the subprocess needs to continue running until it is done, even after the client disconnects.

Is it possible to do this? And if so, please send me in the right direction..Its all new to me.

Thanks in advance!


Solution

  • There's nothing in Twisted's child-process support that will automatically kill the child process when any particular TCP client disconnects. The behavior you're asking about is basically the default behavior.