[Twisted-Python] documentation / kqueue / feedback

Dr Pythoniac dr.pythoniac at googlemail.com
Thu Apr 17 08:10:45 EDT 2008


Hi Jean-Paul

Smarthead :)

You were right. I quickly ripped out the forking code in daemonize in _twistd_unix - et voila: It runs nicely.

Now that's one of the points where it'd be great to know more about the inner workings of TM. If i did, I probably could just open them sockets (fire up the whole event engine) _after_ forking, i.e. in the child process.

As it is, though, (me newbie, gazing unsmartly at TM *g) I'd rather not touch it.

Thanks for having your Synapses fire ;)



Jean-Paul Calderone <exarkun at divmod.com> wrote:

> >I find it very strange anyway, that the beast breaks as soon as it's
> >daemonized. Any idea, why ?
> 
> Not really.  Maybe forking is having some unpleasant interaction with
> the kqueue state?  This seems like a stretch though.  Oops, actually
> maybe that's exactly it?  I only have an OS X machine handy at the
> moment, but maybe this is significant:
> 
>   The kqueue() system call creates a new kernel event queue and returns
>   a descriptor.  The queue is not inherited by a child created with
>   fork(2).
> 




More information about the Twisted-Python mailing list