timeout the (child) process if the connection hangs. I don't really want to fork at all but I need a way of terminating the port check after a number of seconds and to jump to the next port. I tried something like$SIG{"ALRM"} = sub { print "TIME_OUT! at $timeout\n"; exit; }; alarm ($timeout);
But the SIG does not "happen" inside the loop so the next fails. timeout the (child) proccess if the connection hangs. I don't realy want to fork at all but I need a way of terminating the port check after a number of secconds and to jump to the next port. I tried something like$SIG{"ALRM"} = sub { next; }; alarm($timeout);
But the SIG does not "happen" inside the loop so the nect fails.$SIG{"ALRM"} = sub { next; }; alarm($timeout);
In reply to Re: Re: New Child to Wait for First Child to Die
by spike_hodge
in thread New Child to Wait for First Child to Die
by spike_hodge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |