From: dtucker Date: Fri, 28 Aug 2009 01:02:37 +0000 (+0000) Subject: - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/commitdiff_plain/5e934f7839657a63c8f4715f4285d2217bbc784f - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on the pty master on Solaris, since it never succeeds and can hang if large amounts of data is sent to the slave (eg a copy-paste). Based on a patch originally from Doke Scott, ok djm@ --- diff --git a/ChangeLog b/ChangeLog index 90da28c1..e24f7327 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ attempting atomic rename(); ok dtucker@ - (djm) [Makefile.in] bz#1505: Solaris make(1) doesn't accept make variables in argv, so pass them in the environment; ok dtucker@ + - (dtucker) [channels.c configure.ac] Bug #1528: skip the tcgetattr call on + the pty master on Solaris, since it never succeeds and can hang if large + amounts of data is sent to the slave (eg a copy-paste). Based on a patch + originally from Doke Scott, ok djm@ 20090820 - (dtucker) [includes.h] Bug #1634: do not include system glob.h if we're not diff --git a/channels.c b/channels.c index efb04d65..e8b8aa07 100644 --- a/channels.c +++ b/channels.c @@ -1653,6 +1653,7 @@ channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset) } return -1; } +#ifndef BROKEN_TCGETATTR_ICANON if (compat20 && c->isatty && dlen >= 1 && buf[0] != '\r') { if (tcgetattr(c->wfd, &tio) == 0 && !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { @@ -1666,6 +1667,7 @@ channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset) packet_send(); } } +#endif buffer_consume(&c->output, len); if (compat20 && len > 0) { c->local_consumed += len; diff --git a/configure.ac b/configure.ac index 089c2e3e..9524d5c3 100644 --- a/configure.ac +++ b/configure.ac @@ -671,6 +671,7 @@ mips-sony-bsd|mips-sony-newsos4) after setsid()]) AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd in case the name is longer than 8 chars]) + AC_DEFINE(BROKEN_TCGETATTR_ICANON, tcgetattr with ICANON may hang) external_path_file=/etc/default/login # hardwire lastlog location (can't detect it on some versions) conf_lastlog_location="/var/adm/lastlog"