Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Timing out shell commands (paranoia)

by Dominus (Parson)
on May 02, 2001 at 18:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://77333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-24 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found