in reply to Re: fork - child executes code outside of block
in thread fork - child executes code outside of block
Why split the parent's code like that?
defined( my $pid = fork() ) or die("fork: $!"); if (!$pid) { print "CHILD --" . "\n"; exit; } print "PARENT --" . "\n"; waitpid($pid, 0) ; print "-- PARENT " . "\n"; print "PID - $pid , MAIN PRG --" . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: fork - child executes code outside of block
by tybalt89 (Monsignor) on Mar 28, 2018 at 18:53 UTC | |
by ikegami (Patriarch) on Mar 28, 2018 at 19:38 UTC | |
by tybalt89 (Monsignor) on Mar 28, 2018 at 19:53 UTC | |
by ikegami (Patriarch) on Mar 29, 2018 at 12:55 UTC |