diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | channels.c | 9 |
2 files changed, 9 insertions, 6 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20070611 | ||
2 | - (djm) Bugzilla #1306: silence spurious error messages from hang-on-exit | ||
3 | fix; tested by dtucker@ and jochen.kirn AT gmail.com | ||
4 | |||
1 | 20070605 | 5 | 20070605 |
2 | - (dtucker) OpenBSD CVS Sync | 6 | - (dtucker) OpenBSD CVS Sync |
3 | - djm@cvs.openbsd.org 2007/05/22 10:18:52 | 7 | - djm@cvs.openbsd.org 2007/05/22 10:18:52 |
@@ -2972,4 +2976,4 @@ | |||
2972 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 2976 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
2973 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 2977 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
2974 | 2978 | ||
2975 | $Id: ChangeLog,v 1.4679 2007/06/05 10:01:16 dtucker Exp $ | 2979 | $Id: ChangeLog,v 1.4680 2007/06/11 03:03:16 djm Exp $ |
diff --git a/channels.c b/channels.c index c68ad6419..bb14450f4 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1446,14 +1446,13 @@ static int | |||
1446 | channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset) | 1446 | channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset) |
1447 | { | 1447 | { |
1448 | char buf[CHAN_RBUF]; | 1448 | char buf[CHAN_RBUF]; |
1449 | int len; | 1449 | int len, force; |
1450 | 1450 | ||
1451 | if (c->rfd != -1 && | 1451 | force = c->isatty && c->detach_close && c->istate != CHAN_INPUT_CLOSED; |
1452 | (c->detach_close || FD_ISSET(c->rfd, readset))) { | 1452 | if (c->rfd != -1 && (force || FD_ISSET(c->rfd, readset))) { |
1453 | errno = 0; | 1453 | errno = 0; |
1454 | len = read(c->rfd, buf, sizeof(buf)); | 1454 | len = read(c->rfd, buf, sizeof(buf)); |
1455 | if (len < 0 && (errno == EINTR || | 1455 | if (len < 0 && (errno == EINTR || (errno == EAGAIN && !force))) |
1456 | (errno == EAGAIN && !(c->isatty && c->detach_close)))) | ||
1457 | return 1; | 1456 | return 1; |
1458 | #ifndef PTY_ZEROREAD | 1457 | #ifndef PTY_ZEROREAD |
1459 | if (len <= 0) { | 1458 | if (len <= 0) { |