in reply to Forking sub inside a module
foreach my $node_name (@nodes) { my $port_hashref = Mod1->sub1($node_name); my $pid = fork; die "Unable to fork: $!\n" unless defined $pid; unless ($pid) { # Child process. Mod2->sub2($node_name, $port_hashref); exit; # When done, child should terminate. } } 1 while -1 != wait; # Reap children.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Forking sub inside a module
by vbruno (Novice) on Jun 15, 2009 at 16:18 UTC | |
by ikegami (Patriarch) on Jun 15, 2009 at 18:00 UTC | |
by FloydATC (Deacon) on Jun 16, 2009 at 07:38 UTC | |
by admiral_grinder (Pilgrim) on Jun 16, 2009 at 13:20 UTC | |
by FloydATC (Deacon) on Jun 16, 2009 at 20:29 UTC |