Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-07-02 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls