Re: [ZODB-Dev] ZEO and fork()

2009-07-02 Thread Pedro Ferreira
> 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? > > Well, the problem is that in the same file there are other imports that end u

Re: [ZODB-Dev] ZEO and fork()

2009-07-02 Thread Jim Fulton
On Jul 1, 2009, at 1:08 PM, Pedro Ferreira wrote: > Hello, > > 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' > else: >print 'child: %s' % os.getpid(