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

Timing out shell commands (paranoia)

by bluto (Curate)
on May 02, 2001 at 04:02 UTC ( #77188=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval {
        local $SIG{ALRM} = sub { die "TIMEDOUT" };
    ...
        ...
    }
    ...
    
  2. or download this
    $pid = open(PIPE, "$command |") or die $!;
    eval {
    ...
        close(PIPE);  ## needed??
        $? ||= 9;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2015-09-04 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (130 votes), past polls