summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
52e8701)
fix; tested by dtucker@ and jochen.kirn AT gmail.com
+20070611
+ - (djm) Bugzilla #1306: silence spurious error messages from hang-on-exit
+ fix; tested by dtucker@ and jochen.kirn AT gmail.com
+
20070605
- (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2007/05/22 10:18:52
20070605
- (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2007/05/22 10:18:52
channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
{
char buf[CHAN_RBUF];
channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
{
char buf[CHAN_RBUF];
- if (c->rfd != -1 &&
- (c->detach_close || FD_ISSET(c->rfd, readset))) {
+ force = c->isatty && c->detach_close && c->istate != CHAN_INPUT_CLOSED;
+ if (c->rfd != -1 && (force || FD_ISSET(c->rfd, readset))) {
errno = 0;
len = read(c->rfd, buf, sizeof(buf));
errno = 0;
len = read(c->rfd, buf, sizeof(buf));
- if (len < 0 && (errno == EINTR ||
- (errno == EAGAIN && !(c->isatty && c->detach_close))))
+ if (len < 0 && (errno == EINTR || (errno == EAGAIN && !force)))
return 1;
#ifndef PTY_ZEROREAD
if (len <= 0) {
return 1;
#ifndef PTY_ZEROREAD
if (len <= 0) {