From 144e8d60cd3dcfdbf23c6df06617adf28b1235b8 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 25 Jun 2006 08:25:25 +1000 Subject: - (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround to ptys only, otherwise sshd can hang exiting non-interactive sessions. --- channels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'channels.c') diff --git a/channels.c b/channels.c index 239e9dd83..9642a56ee 100644 --- a/channels.c +++ b/channels.c @@ -1422,7 +1422,8 @@ channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset) #ifndef PTY_ZEROREAD if (len <= 0) { #else - if (len < 0 || (len == 0 && errno != 0)) { + if ((!c->isatty && len <= 0) || + (c->isatty && (len < 0 || (len == 0 && errno != 0)))) { #endif debug2("channel %d: read<=0 rfd %d len %d", c->self, c->rfd, len); -- cgit v1.2.3