in reply to Catching a signal causes my socket server to die
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catching a signal causes my socket server to die
by jimmy5804 (Initiate) on Jan 07, 2009 at 20:56 UTC | |
by ikegami (Patriarch) on Jan 08, 2009 at 01:29 UTC | |
|
Re^2: Catching a signal causes my socket server to die
by jimmy5804 (Initiate) on Jan 07, 2009 at 21:31 UTC |