Sockets accept() in child processes

Merwin merwin.irc at gmail.com
Thu Apr 12 13:48:25 EDT 2012


Le 12/04/2012 19:10, Dan Stromberg a écrit :
>
> I wonder if this'll do what you need:
> https://trac.calendarserver.org/browser/CalendarServer/trunk/twext/python/sendfd.py

The problem is that this is Linux-only solution, and I would like to 
keep a multi-platform compatibility.

There are other ways to do this : use a Lock and do the select() 
directly in the children processes,
but I can't control which process will get the lock, and it's totally 
possible that only 2 processes on 8
will accept connections alternatively.






More information about the Python-list mailing list