If you want to time out reading the output of an external command, then you really need to use open(PIPE,"$command |")... and not backticks.
Besides the problem you have already noticed, signals in Perl still aren't reliable and so have about a 2% chance of breaking Perl each time you use a Perl signal handler. So it doesn't take very many invocations of signal handlers before you have a pretty good chance of your script behaving unpredictably.
A better solution would be to use select on a PIPE that was opened.
- tye (but my friends call me "Tye")In reply to (tye)Re: backticks stop working
by tye
in thread backticks stop working
by dlee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |