[Twisted-Python] Processes in Twisted, only possible to run external prog?

Jean-Paul Calderone exarkun at divmod.com
Fri Aug 29 09:47:46 EDT 2008

On Fri, 29 Aug 2008 13:35:24 -0000, glyph at divmod.com wrote:
>On 09:06 am, gabriel.rossetti at arimaz.com wrote:
>> [snip]
>>Should I just use python's fock() instead? Is it safe with Twisted?
> [snip]
>Using fork() in Python has a lot of confusing issues associated with it 
>unless you're going to exec() immediately afterwards.  You probably want to 
>stick to one of these other approaches.

You also need to do some other stuff before you call fork(), like close
file descriptors and disable garbage collection.  And then re-enable it
in the parent after the fork().  There's probably even some more things
that are necessary that no one has realized yet.


More information about the Twisted-Python mailing list