X-Git-Url: https://git.distorted.org.uk/~mdw/with-authinfo-kludge/blobdiff_plain/60a565fb5ac693608f47994e723889bd84074672..e0b2f3277cbedeca090d16552c730eb8d40b638b:/with-authinfo-kludge diff --git a/with-authinfo-kludge b/with-authinfo-kludge index 91785cc..950ea3b 100755 --- a/with-authinfo-kludge +++ b/with-authinfo-kludge @@ -766,11 +766,13 @@ sub run_client (@) { sub accept_loop () { my $rfd_in = ""; for my $fd (keys %SERVMAP) { vec($rfd_in, $fd, 1) = 1; } - for (;;) { + SELECT: for (;;) { my ($n, $t) = select my $rfd_out = $rfd_in, undef, undef, undef; - $n >= 0 || $! == EINTR or sysfail "select failed: $!"; + if ($n >= 0) { } + elsif ($! == EINTR) { next SELECT; } + else { sysfail "select failed: $!"; } FD: for my $fd (keys %SERVMAP) { - next unless vec $rfd_out, $fd, 1; + next FD unless vec $rfd_out, $fd, 1; my ($s, $a, $sk) = @{$SERVMAP{$fd}}; my $nsk; unless (accept $nsk, $sk) {