summaryrefslogtreecommitdiff
path: root/nchan.c
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2001-04-03 13:02:48 +0000
committerKevin Steves <stevesk@pobox.com>2001-04-03 13:02:48 +0000
commitefe5fd811bee766f4d5f5b5d0072d271bfd24f49 (patch)
tree12b7b8cf86827ecf26915a9ddbb195fa2179345f /nchan.c
parent3704c2612acefaf588aa58d4d89116d29feef677 (diff)
- (stevesk) nchan.c: remove ostate checks and add EINVAL to
shutdown(SHUT_RD) error() bypass for HP-UX.
Diffstat (limited to 'nchan.c')
-rw-r--r--nchan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/nchan.c b/nchan.c
index d91217e54..77e4ef486 100644
--- a/nchan.c
+++ b/nchan.c
@@ -489,11 +489,10 @@ chan_shutdown_read(Channel *c)
489 /* 489 /*
490 * shutdown(sock, SHUT_READ) may return ENOTCONN if the 490 * shutdown(sock, SHUT_READ) may return ENOTCONN if the
491 * write side has been closed already. (bug on Linux) 491 * write side has been closed already. (bug on Linux)
492 * HP-UX will return EINVAL.
492 */ 493 */
493 if (shutdown(c->sock, SHUT_RD) < 0 494 if (shutdown(c->sock, SHUT_RD) < 0
494 && (errno != ENOTCONN 495 && (errno != ENOTCONN && errno != EINVAL))
495 || c->ostate == CHAN_OUTPUT_OPEN
496 || c->ostate == CHAN_OUTPUT_WAIT_DRAIN))
497 error("channel %d: chan_shutdown_read: shutdown() failed for fd%d [i%d o%d]: %.100s", 496 error("channel %d: chan_shutdown_read: shutdown() failed for fd%d [i%d o%d]: %.100s",
498 c->self, c->sock, c->istate, c->ostate, strerror(errno)); 497 c->self, c->sock, c->istate, c->ostate, strerror(errno));
499 } else { 498 } else {