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

Re: sleep doesn't respond to sigint(2)?

by JamesNC (Chaplain)
on Oct 17, 2003 at 16:39 UTC ( [id://300148]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to sleep doesn't respond to sigint(2)?

Just use a smaller sleep an count or you you can use select to get a really small wait between looks like so
#!/perl/bin/perl -w use strict; $SIG{'INT'} = 'cleanup'; my $c= 0; while (1) { select(undef, undef, undef, .2); $c++; if($c == 50 ){ #10 seconds print "checking something...\n"; $c= 0; } } sub cleanup {die "\nending\n";}

JamesNC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://300148]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.