in reply to Forking problems
Update: Oops fixed bug pointed out by pc88mxer below.if(my $pid = fork){ print "I am the parent my pid is $$ and my child has pid: $pid\n"; } elsif(defined $pid and $pid == 0){ print "I am the child and my pid is $$\n"; } else{ print "Oh no :-(\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Forking problems
by pc88mxer (Vicar) on Mar 21, 2008 at 17:00 UTC | |
|
Re^2: Forking problems
by ikegami (Patriarch) on Mar 22, 2008 at 01:14 UTC |