diff options
author | Colin Watson <cjwatson@debian.org> | 2007-06-18 19:46:10 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2007-06-18 19:46:10 +0000 |
commit | d2738eb9f31d20d0abfdbb1dd41e6af5e521a5d9 (patch) | |
tree | c1c69bc1d030f4346d18d8af7e2a27ad84c37b9f | |
parent | ed17ab8ceff058aca48fd66fa974a3600a5e3ade (diff) |
* Backport from upstream:
- Silence spurious error messages from hang-on-exit fix
(http://bugzilla.mindrot.org/show_bug.cgi?id=1306, closes: #429531).
-rw-r--r-- | channels.c | 9 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/channels.c b/channels.c index 530c0d460..6b0fb0b71 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) { |
diff --git a/debian/changelog b/debian/changelog index 95a7c741b..7ffc040da 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -12,6 +12,9 @@ openssh (1:4.6p1-2) UNRELEASED; urgency=low | |||
12 | * Add try-restart action to init script. | 12 | * Add try-restart action to init script. |
13 | * Add /etc/network/if-up.d/openssh-server to restart sshd when new | 13 | * Add /etc/network/if-up.d/openssh-server to restart sshd when new |
14 | interfaces appear (LP: #103436). | 14 | interfaces appear (LP: #103436). |
15 | * Backport from upstream: | ||
16 | - Silence spurious error messages from hang-on-exit fix | ||
17 | (http://bugzilla.mindrot.org/show_bug.cgi?id=1306, closes: #429531). | ||
15 | 18 | ||
16 | -- Colin Watson <cjwatson@debian.org> Wed, 13 Jun 2007 00:56:45 +0100 | 19 | -- Colin Watson <cjwatson@debian.org> Wed, 13 Jun 2007 00:56:45 +0100 |
17 | 20 | ||