in reply to Re^2: Kill process after X mins
in thread Kill process after X mins
alarm is likely a feature supplied by your operating system, so whether alarm works for a "hung" process really depends on your operating system and what you consider "hung".
On unixish operating systems, SIGALRM will interrupt almost any (system) call. Most recent versions of Perl will likely only process signals after system calls have returned ("safe signals"). If your program gets "hung" in an endless loop, the SIGALRM handler will stop your program. If your program gets "hung" in some system call, it will not necessarily get immediately stopped.
Personally, I question the wisdom of the person administrating the "shared server" without hard ulimits and hard maximum request limits, but maybe they have reasons for not limiting the resources users can consume.
|
|---|