You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mman Show activity 3/1/10
Hello all,
I'm using the ForkingServer and I have noticed that the server-side
hangs
when a client disconnects. Looking through the code I found that the
SIGCHLD
handler inside the ForkingServer class needs some checks. Below is a
patch
that fixes the problem. Tomer, feel free to include this in the rpyc
distribution.
I'm using python 2.6.4 here.
diff -ur rpyc-3.0.7-py2.6/utils/server.py rpyc-3.0.7-py2.6.my/utils/
server.py
--- rpyc-3.0.7-py2.6/utils/server.py 2009-09-22 14:38:28.000000000
+0300
+++ rpyc-3.0.7-py2.6.my/utils/server.py 2010-03-01 12:44:36.000000000
+0200
@@ -202,11 +202,15 @@
def _handle_sigchld(signum, unused):
try:
while True:
- os.waitpid(-1, os.WNOHANG)
+ r = os.waitpid(-1, os.WNOHANG)
+ print "waitpid returned %s" % repr(r)
+ if r == (0, 0):
+ time.sleep(1)
+ else:
+ print "our child %d terminated" % r[0]
+ break
except OSError:
pass
- # re-register signal handler (see man signal(2), under
Portability)
- signal.signal(signal.SIGCHLD, self._handle_sigchld)
def _accept_method(self, sock):
pid = os.fork()
The text was updated successfully, but these errors were encountered:
mman Show activity 3/1/10
Hello all,
I'm using the ForkingServer and I have noticed that the server-side
hangs
when a client disconnects. Looking through the code I found that the
SIGCHLD
handler inside the ForkingServer class needs some checks. Below is a
patch
that fixes the problem. Tomer, feel free to include this in the rpyc
distribution.
I'm using python 2.6.4 here.
The text was updated successfully, but these errors were encountered: