is hanging, and stoping the flow of the code. Is there someway to set a timeout on it, or wrap it in an eval?my $retval = `/usr/bin/snmpget -v1 -c <commstring> $ip sysDescr.0`;
Alarms don't work well in threads, but you could try running a parallel thread to act as a timer, and run the snmpget command thru a piped-open or IPC::Open3 so you get a pid that can be killed when the timer times out.
In reply to Re: threads hang
by zentara
in thread threads hang
by Ryszard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |