with-authinfo-kludge (accept_loop): Might as well use the loop name.
[with-authinfo-kludge] / with-authinfo-kludge
index 91785cc..950ea3b 100755 (executable)
@@ -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) {