in reply to Re: Executing Systems Calls with Care
in thread Executing Systems Calls with Care

alarm() will not interrupt system calls in perl starting with 5.8. Since you are using a version older than that, you may be able to use it.

  • Comment on Re^2: Executing Systems Calls with Care

Replies are listed 'Best First'.
Re^3: Executing Systems Calls with Care
by lidden (Curate) on Feb 15, 2005 at 21:30 UTC
    But it does.

    $ perl5.8.6 -wle 'alarm 3; `cat /dev/zero`' Stops after 3 seconds.
      FWIW, on MacOS and AIX,

      perl -le 'alarm 3; system("sleep 100");'

      does kill perl, but it doesn't kill the sleep.