AIX hang problem again (was Re: AIX and Privsep.)
Markus Friedl
markus at openbsd.org
Fri Jul 5 23:42:14 EST 2002
On Fri, Jul 05, 2002 at 02:12:06PM +0100, Leigh Brown wrote:
> diff -ur openssh/channels.c openssh.local/channels.c
> --- openssh/channels.c Thu Jul 4 19:11:10 2002
> +++ openssh.local/channels.c Fri Jul 5 13:58:27 2002
> @@ -1278,12 +1278,13 @@
> buffer_len(&c->output) > 0) {
> data = buffer_ptr(&c->output);
> dlen = buffer_len(&c->output);
> - len = write(c->wfd, data, dlen);
oops.
> #ifdef _AIX
> /* XXX: Later AIX versions can't push as much data to tty */
> - if (compat20 && c->isatty && dlen >= 8*1024)
> + if (compat20 && isatty(c->wfd) && dlen > 8*1024) {
do you really need to check isatty(c->wfd) ?
> dlen = 8*1024;
> + }
> #endif
> + len = write(c->wfd, data, dlen);
> if (len < 0 && (errno == EINTR || errno == EAGAIN))
> return 1;
> if (len <= 0) {
More information about the openssh-unix-dev
mailing list