Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-12-02 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (49 votes). Check out past polls.