AIX hang problem again (was Re: AIX and Privsep.)
Ben Lindstrom
mouring at etoh.eviladmin.org
Tue Jul 16 05:20:43 EST 2002
Markus, any quarms?
- Ben
On Fri, 5 Jul 2002, Leigh Brown wrote:
> Hi,
>
> I have to say sorry. I thought I'd tested your patch correctly but I
> was wrong (probably I'd left my other code hanging around). Luckily,
> you put the test after the write instead of before, so it needs to be
> changed anyway :-)
>
> It seems that c->isatty is only set if nonblock is true, which is not
> the case for some reason. I changed the test to use isatty(c->wfd)
> instead and that made it work; I hope that is acceptable.
>
> I've attached a patch against last night's snapshot that does as I've
> described.
>
> Cheers,
>
> Leigh.
>
>
>
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);
#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) {
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