$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).
- tyeIn reply to Re: If I Want every child process to have EXACTLY 2 minutes to execute?
by tye
in thread If I Want every child process to have EXACTLY 2 minutes to execute?
by reyjrar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |