Re: forking doubt

2006-03-14 Thread Jeff Pang
It's not so easy to do that. you should use the signal to communicate between childs and parent. -Original Message- >From: Saurabh Singhvi <[EMAIL PROTECTED]> >Sent: Mar 14, 2006 3:57 AM >To: Perl FAq >Subject: forking doubt > >Hi all, > > > my

Re: forking doubt

2006-03-14 Thread Paul Johnson
On Tue, Mar 14, 2006 at 08:57:03AM +, Saurabh Singhvi wrote: >my $child = fork (); > >unless ($child) { >sleep 5; >print "child\n"; >} > >print "parent\n" if $child; >print "parent2\n" if $child; > > > the above code prints the parent lines followed by t

forking doubt

2006-03-14 Thread Saurabh Singhvi
Hi all, my $child = fork (); unless ($child) { sleep 5; print "child\n"; } print "parent\n" if $child; print "parent2\n" if $child; the above code prints the parent lines followed by the child. Now what i want to do is print the parent line1 and then the child fol