only, otherwise sshd can hang exiting non-interactive sessions.
+20060625
+ - (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround to ptys
+ only, otherwise sshd can hang exiting non-interactive sessions.
+
20060624
- (dtucker) [configure.ac] Bug #1193: Define PASSWD_NEEDS_USERNAME on Solaris.
Works around limitation in Solaris' passwd program for changing passwords
#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);
#ifndef PTY_ZEROREAD
} else if (len <= 0) {
#else
- } else if (len < 0 || (len == 0 && errno != 0)) {
+ } else if ((!isatty(fdout) && len <= 0) ||
+ (isatty(fdout) && (len < 0 || (len == 0 && errno != 0)))) {
#endif
fdout_eof = 1;
} else {
#ifndef PTY_ZEROREAD
} else if (len <= 0) {
#else
- } else if (len < 0 || (len == 0 && errno != 0)) {
+ } else if ((!isatty(fderr) && len <= 0) ||
+ (isatty(fderr) && (len < 0 || (len == 0 && errno != 0)))) {
#endif
fderr_eof = 1;
} else {