On 2012-07-21 15:41, punit jain wrote:
You can let the ALRM-sub simply set a global variable, like $STOP.
Your process should check this before starting a next iteration.
I suppose this needs to be set in parent process which means Signal needs
to be invoked in parent. Is my understanding correct ? Will any new
subprocess that is going to get started will have access to this Global
variable ?
See my previous reply:
"Beware that each child needs its own alarm. The parent won't need one."
Nothing is shared between parent and children!
Children are created by fork, at that point the current state is copied
(COW) to the new (child) process.
After forking, all the parent process should do, is wait for the
children to finish.
Once all children are finished, it can do some clean up or merging, but
don't overdo that.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/