in reply to If I Want every child process to have EXACTLY 2 minutes to execute?

$SIG{ALRM}= sub { exit(0); }; alarm 120;

runrig is certainly right when programming in C (set a flag and return). However, Perl signal handlers are unsafe no matter what you do so I'd go with your solution (with the typos fixed as I've shown).

     - tye
  • Comment on Re: If I Want every child process to have EXACTLY 2 minutes to execute?
  • Download Code