summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-11-29 11:26:45 +1100
committerDamien Miller <djm@mindrot.org>2000-11-29 11:26:45 +1100
commita2e53ccb64c42a635b4618b592e470a02c0142b0 (patch)
tree591f4bb959812ebf69d5edaa1d6bc2832fdc690f /session.c
parentd592b632968fbec154c81b93c99b283200b257b6 (diff)
- (djm) Fix(?) the ssh hang-on-logout/data-from-child race
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/session.c b/session.c
index 826307ef..b6c847b8 100644
--- a/session.c
+++ b/session.c
@@ -1898,13 +1898,12 @@ session_exit_message(Session *s, int status)
* interested in data we write.
* Note that we must not call 'chan_read_failed', since there could
* be some more data waiting in the pipe.
- * djm - This is no longer true as we have allowed one pass through
- * the select loop before killing the connection
*/
if (c->ostate != CHAN_OUTPUT_CLOSED)
chan_write_failed(c);
if (c->istate != CHAN_INPUT_CLOSED)
- chan_read_failed(c);
+ c->istate = CHAN_INPUT_WAIT_DRAIN;
+
s->chanid = -1;
}