in reply to Self terminating a script after a specified time

See alarm.
  • Comment on Re: Self terminating a script after a specified time

Replies are listed 'Best First'.
Re^2: Self terminating a script after a specified time
by Anonymous Monk on Jan 07, 2015 at 20:59 UTC

    Some notable things about alarm:

    Only one timer may be counting at once. Each call disables the previous timer

    It is usually a mistake to intermix alarm and sleep calls, because sleep may be internally implemented on your system with alarm.

    If you want to use alarm to time out a system call you need to use an eval/die pair. ... caveats given in Signals in perlipc.

    Portability issues: alarm in perlport.