summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/nchan.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-06-27 22:31:32 +0000
committerdes <des@FreeBSD.org>2002-06-27 22:31:32 +0000
commitbb02848f18878bddada7a9f55b110116f63c2f3c (patch)
treed93e4bc5fc0a9a5e99878bd93a4d51c873c1a43e /crypto/openssh/nchan.c
parent610201f50fdb0594e9885594b69e4ee69c71dd08 (diff)
downloadFreeBSD-src-bb02848f18878bddada7a9f55b110116f63c2f3c.zip
FreeBSD-src-bb02848f18878bddada7a9f55b110116f63c2f3c.tar.gz
Vendor import of OpenSSH 3.3p1.
Diffstat (limited to 'crypto/openssh/nchan.c')
-rw-r--r--crypto/openssh/nchan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/openssh/nchan.c b/crypto/openssh/nchan.c
index b9b304d..bce7325 100644
--- a/crypto/openssh/nchan.c
+++ b/crypto/openssh/nchan.c
@@ -463,7 +463,13 @@ chan_shutdown_read(Channel *c)
return;
debug("channel %d: close_read", c->self);
if (c->sock != -1) {
- if (shutdown(c->sock, SHUT_RD) < 0)
+ /*
+ * shutdown(sock, SHUT_READ) may return ENOTCONN if the
+ * write side has been closed already. (bug on Linux)
+ * HP-UX may return ENOTCONN also.
+ */
+ if (shutdown(c->sock, SHUT_RD) < 0
+ && errno != ENOTCONN)
error("channel %d: chan_shutdown_read: "
"shutdown() failed for fd%d [i%d o%d]: %.100s",
c->self, c->sock, c->istate, c->ostate,
OpenPOWER on IntegriCloud