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(

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-01 Thread Shane Hathaway
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' > else: > print 'child: %s' % os.getpid() > > And it worked with ZODB 3.4,

[ZODB-Dev] ZEO and fork()

2009-07-01 Thread Pedro Ferreira
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() And it worked with ZODB 3.4, but we recently noticed that with 3.8