mp3car-2001 has asked for the wisdom of the Perl Monks concerning the following question:
@array_of_hosts while(hostsleft){ fork() if child{ pop @array_of_hosts and go to town with that host } parent code{ pop @array_of_hosts and throw away value, continue on with loo +p } }
My idea is that the parent pop's the stack right after the fork, so that the value the child process got is no longer in the stack. Is this the right thing to do, or is there a "right thing to do"?
many thanks,
Joe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using a stack with fork()
by merlyn (Sage) on Jan 06, 2001 at 06:08 UTC | |
by geektron (Curate) on Jan 06, 2001 at 07:14 UTC | |
by merlyn (Sage) on Jan 06, 2001 at 12:14 UTC | |
|
Re: Using a stack with fork()
by Fastolfe (Vicar) on Jan 06, 2001 at 06:10 UTC | |
|
Re: Using a stack with fork()
by mp3car-2001 (Scribe) on Jan 06, 2001 at 06:17 UTC | |
by $code or die (Deacon) on Jan 06, 2001 at 07:32 UTC |