~mdw
/
with-authinfo-kludge
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
with-authinfo-kludge (accept_loop): Might as well use the loop name.
[with-authinfo-kludge]
/
with-authinfo-kludge
diff --git
a/with-authinfo-kludge
b/with-authinfo-kludge
index
91785cc
..
950ea3b
100755
(executable)
--- 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; }
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;
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) {
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) {
my ($s, $a, $sk) = @{$SERVMAP{$fd}};
my $nsk;
unless (accept $nsk, $sk) {