#!/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";}
In reply to Re: sleep doesn't respond to sigint(2)?
by JamesNC
in thread sleep doesn't respond to sigint(2)?
by RolandGunslinger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |