diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2007-06-14 21:43:26 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2007-06-14 21:43:26 +0000 |
commit | 679a6f69b9ef2cfee46ca0cbe1209c48795605aa (patch) | |
tree | b7f94d57bb0337f09229cf56326f65da8cd90725 | |
parent | 6b09d4aa7f9f0d587f99b245eee31227516e5ee6 (diff) |
handle EINTR when waiting for mux exit status properly
-rw-r--r-- | usr.bin/ssh/ssh.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index ad5b49a917f..3aa94789bc8 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.298 2007/06/12 11:45:27 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.299 2007/06/14 21:43:25 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1443,8 +1443,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); |