Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: trying to get timeout to work

by Eliya (Vicar)
on Apr 11, 2012 at 14:13 UTC ( #964545=note: print w/ replies, xml ) Need Help??


in reply to trying to get timeout to work

alarm doesn't automatically kill the piped subprocess (and the parent waits for it), so you need to take care of this yourself, e.g. in the signal handler

use Sys::SigAction qw( set_sig_handler ); eval { my $h = set_sig_handler( 'ALRM' ,sub { kill 15, $opened; # <-- die "TIMEOUT\n"; }, { ...


Comment on Re: trying to get timeout to work
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-09-21 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls