Re: confused with os.fork()

2009-12-03 Thread Aahz
In article , Dennis Lee Bieber wrote: >On Wed, 25 Nov 2009 13:52:09 -0800 (PST), Sandy >declaimed the following in gmane.comp.python.general: >> >> Sometimes (very rare) it prints something like this: >> ab >> c >> d >> e > > Not > >ab > >c >d >e > >? That's what I would guess, too. >

Re: confused with os.fork()

2009-11-25 Thread MRAB
Sandy wrote: Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) From most of the tuts and examples I saw online, I expect it

Re: confused with os.fork()

2009-11-25 Thread Diez B. Roggisch
Sandy schrieb: Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) From most of the tuts and examples I saw online, I expect it

confused with os.fork()

2009-11-25 Thread Sandy
Hi all, I am a little bit confused about os.fork(). Say I have the following code. import os a = ['a','b','c','d','e'] for i in xrange(len(a)): pid = os.fork() if not pid: print a[i] os._exit(0) >From most of the tuts and examples I saw online, I expect it to print a,b,c,