Commit 40f1a033 authored by Guido van Rossum's avatar Guido van Rossum

I think I've seen a child process that didn't exec another program

service asyncore events intended for a ClientStorage created in the
parent.  That can't be intended.  The best way I can see to avoid this
is simply to clear asyncore's socket_map after the fork.
parent 8dda7995
...@@ -108,8 +108,9 @@ else: ...@@ -108,8 +108,9 @@ else:
rd, wr = os.pipe() rd, wr = os.pipe()
pid = os.fork() pid = os.fork()
if pid == 0: if pid == 0:
asyncore.socket_map.clear() # Don't service the parent's sockets
import ZEO.zrpc.log import ZEO.zrpc.log
reload(ZEO.zrpc.log) reload(ZEO.zrpc.log) # Don't share the logging file object
try: try:
if PROFILE: if PROFILE:
p = hotshot.Profile("stats.s.%d" % os.getpid()) p = hotshot.Profile("stats.s.%d" % os.getpid())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment