Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Timing out shell commands (paranoia)

by Dominus (Parson)
on May 02, 2001 at 18:31 UTC ( #77333=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      #!/usr/bin/perl
      # stopafter - run a command with a timeout
    ...
      alarm($time);
      exec @ARGV;
      die "Couldn't exec @ARGV: $!; aborting";
    
  2. or download this
        stopafter 300 command arg arg...
    
  3. or download this
        open FH, "stopafter 10 command |" or die ...;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-07-31 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls