<br>I wonder if this'll do what you need:<br><a href="https://trac.calendarserver.org/browser/CalendarServer/trunk/twext/python/sendfd.py">https://trac.calendarserver.org/browser/CalendarServer/trunk/twext/python/sendfd.py</a><br>
<br><div class="gmail_quote">On Thu, Apr 12, 2012 at 2:31 AM, Thibaut DIRLIK <span dir="ltr"><<a href="mailto:merwin.irc@gmail.com">merwin.irc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>I'm writing a multiprocess server with Python 3.2 and the multiprocessing module. Here is my current implementation :<br><br>- Main process: select() on a list of server sockets (different ips of the host, ssl or not, etc)<br>

- Children process : When they get a signal (in fact, a message in a pipe), they will accept() the server socket<br><br>The problem is that after select() returns, I can accept() in the main process, but in a children process I got a EAGAIN error.<br>

The sockets are non-blocking. It seems that accept() can only be called in the same process that the one which selected().<br><br>This is a problem because I wanted to "decide" which process I should ask to take the connection<br>

to do some basic load-balacing based on current number of connected client in each process.<br><br>Could someone help me or propose other implementations ?<br><br>Thank you,<br>
<br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
<br></blockquote></div><br>