Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Executing Systems Calls with Care

by diotalevi (Canon)
on Feb 15, 2005 at 21:10 UTC ( [id://431327]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://431327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2024-04-23 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found