in reply to Re^2: Monitor Perl script within the same script?
in thread Monitor Perl script within the same script?
This is untested. I think the approach will work, but as always, you mileage may vary. Update: time is in seconds not minutes.$SIG{ALRM} = sub { #cleanup lockfile #cleanup anything else exit; } alarm(1200); # do stuff # If you have system calls here (i.e. sysread) you # may need to do some wrapping with eval etc. (as per # the alarm perldoc alarm(0);
|
|---|