summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels.c b/channels.c
index cf6742ae3..fe99cdbec 100644
--- a/channels.c
+++ b/channels.c
@@ -186,6 +186,7 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
186 } else { 186 } else {
187 c->isatty = 0; 187 c->isatty = 0;
188 } 188 }
189 c->wfd_isatty = isatty(c->wfd);
189 190
190 /* enable nonblocking mode */ 191 /* enable nonblocking mode */
191 if (nonblock) { 192 if (nonblock) {
@@ -1286,12 +1287,12 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
1286 buffer_len(&c->output) > 0) { 1287 buffer_len(&c->output) > 0) {
1287 data = buffer_ptr(&c->output); 1288 data = buffer_ptr(&c->output);
1288 dlen = buffer_len(&c->output); 1289 dlen = buffer_len(&c->output);
1289 len = write(c->wfd, data, dlen);
1290#ifdef _AIX 1290#ifdef _AIX
1291 /* XXX: Later AIX versions can't push as much data to tty */ 1291 /* XXX: Later AIX versions can't push as much data to tty */
1292 if (compat20 && c->isatty && dlen >= 8*1024) 1292 if (compat20 && c->wfd_isatty && dlen > 8*1024)
1293 dlen = 8*1024; 1293 dlen = 8*1024;
1294#endif 1294#endif
1295 len = write(c->wfd, data, dlen);
1295 if (len < 0 && (errno == EINTR || errno == EAGAIN)) 1296 if (len < 0 && (errno == EINTR || errno == EAGAIN))
1296 return 1; 1297 return 1;
1297 if (len <= 0) { 1298 if (len <= 0) {