- (djm) Bugzilla #1306: silence spurious error messages from hang-on-exit
fix; tested by dtucker@ and jochen.kirn AT gmail.com
This commit is contained in:
parent
66177929ae
commit
835284b74c
|
@ -1,3 +1,7 @@
|
||||||
|
20070611
|
||||||
|
- (djm) Bugzilla #1306: silence spurious error messages from hang-on-exit
|
||||||
|
fix; tested by dtucker@ and jochen.kirn AT gmail.com
|
||||||
|
|
||||||
20070605
|
20070605
|
||||||
- (dtucker) OpenBSD CVS Sync
|
- (dtucker) OpenBSD CVS Sync
|
||||||
- djm@cvs.openbsd.org 2007/05/22 10:18:52
|
- djm@cvs.openbsd.org 2007/05/22 10:18:52
|
||||||
|
@ -2972,4 +2976,4 @@
|
||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4679 2007/06/05 10:01:16 dtucker Exp $
|
$Id: ChangeLog,v 1.4680 2007/06/11 03:03:16 djm Exp $
|
||||||
|
|
|
@ -1446,14 +1446,13 @@ static int
|
||||||
channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
|
channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
|
||||||
{
|
{
|
||||||
char buf[CHAN_RBUF];
|
char buf[CHAN_RBUF];
|
||||||
int len;
|
int len, force;
|
||||||
|
|
||||||
if (c->rfd != -1 &&
|
force = c->isatty && c->detach_close && c->istate != CHAN_INPUT_CLOSED;
|
||||||
(c->detach_close || FD_ISSET(c->rfd, readset))) {
|
if (c->rfd != -1 && (force || FD_ISSET(c->rfd, readset))) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
len = read(c->rfd, buf, sizeof(buf));
|
len = read(c->rfd, buf, sizeof(buf));
|
||||||
if (len < 0 && (errno == EINTR ||
|
if (len < 0 && (errno == EINTR || (errno == EAGAIN && !force)))
|
||||||
(errno == EAGAIN && !(c->isatty && c->detach_close))))
|
|
||||||
return 1;
|
return 1;
|
||||||
#ifndef PTY_ZEROREAD
|
#ifndef PTY_ZEROREAD
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
|
|
Loading…
Reference in New Issue