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
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
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