Pedro Ferreira wrote:
> We have a script that does something like this:
> import os
> from ZEO.ClientStorage import ClientStorage
> if os.fork()==0:
> print ClientStorage(('localhost',9675))
> print 'foo'
> print 'child: %s' % os.getpid()
> And it worked with ZODB 3.4, but we recently noticed that with 3.8 the
> child process hangs. But if we import ClientStorage only inside the
> process, it seems to work OK.
> Is this supposed to happen? Is there a workaround?
Importing ZEO.ClientStorage creates a thread, AFAIK. Using threads with
os.fork() is tricky: you have to ensure the threads get created *after*
forking. You've already done that, so is it not sufficient?
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org