summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2007-06-25 18:35:49 +1000
committerDarren Tucker <dtucker@zip.com.au>2007-06-25 18:35:49 +1000
commita422cfcd46276951ad0daf42902ada56508ed745 (patch)
tree478ae98f2d6a228405ce54eb352e7fccdb57051b
parente64ad08d0ce9bf84cfc80d913ccab84cb8419254 (diff)
- djm@cvs.openbsd.org 2007/06/14 21:43:25
[ssh.c] handle EINTR when waiting for mux exit status properly
-rw-r--r--ssh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssh.c b/ssh.c
index 74c9a091..446184ca 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1464,8 +1464,11 @@ control_client(const char *path)
debug2("Received EOF from master");
break;
}
- if (r == -1 && errno != EINTR)
+ if (r == -1) {
+ if (errno == EINTR)
+ continue;
fatal("%s: read %s", __func__, strerror(errno));
+ }
i += r;
}
close(sock);