in reply to Re: New Child to Wait for First Child to Die
in thread New Child to Wait for First Child to Die
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: New Child to Wait for First Child to Die
by nothingmuch (Priest) on Apr 24, 2003 at 11:07 UTC |