Using a SIGALRM handler seems to not work because it causes accept() to return.
Doesn't the same thing happen with SIGUSR1? If so, just loop back if the error was EINTR.
use Errno qw( EINTR ); do { while (my $client = $sock->accept()) { ... } } while ($! == EINTR);
In reply to Re: Catching a signal causes my socket server to die
by ikegami
in thread Catching a signal causes my socket server to die
by jimmy5804
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |