diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | channels.c | 3 | ||||
-rw-r--r-- | channels.h | 2 |
3 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,10 @@ | |||
1 | 20130801 | ||
2 | - (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non- | ||
3 | blocking connecting socket will clear any stored errno that might | ||
4 | otherwise have been retrievable via getsockopt(). A hack to limit writes | ||
5 | to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap | ||
6 | it in an #ifdef. Diagnosis and patch from Ivo Raisr. | ||
7 | |||
1 | 20130725 | 8 | 20130725 |
2 | - (djm) OpenBSD CVS Sync | 9 | - (djm) OpenBSD CVS Sync |
3 | - djm@cvs.openbsd.org 2013/07/20 22:20:42 | 10 | - djm@cvs.openbsd.org 2013/07/20 22:20:42 |
diff --git a/channels.c b/channels.c index 9e87bfb9e..281df3802 100644 --- a/channels.c +++ b/channels.c | |||
@@ -248,7 +248,10 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd, | |||
248 | 248 | ||
249 | if ((c->isatty = is_tty) != 0) | 249 | if ((c->isatty = is_tty) != 0) |
250 | debug2("channel %d: rfd %d isatty", c->self, c->rfd); | 250 | debug2("channel %d: rfd %d isatty", c->self, c->rfd); |
251 | #ifdef _AIX | ||
252 | /* XXX: Later AIX versions can't push as much data to tty */ | ||
251 | c->wfd_isatty = is_tty || isatty(c->wfd); | 253 | c->wfd_isatty = is_tty || isatty(c->wfd); |
254 | #endif | ||
252 | 255 | ||
253 | /* enable nonblocking mode */ | 256 | /* enable nonblocking mode */ |
254 | if (nonblock) { | 257 | if (nonblock) { |
diff --git a/channels.h b/channels.h index ffd580727..4fab9d7c4 100644 --- a/channels.h +++ b/channels.h | |||
@@ -103,7 +103,9 @@ struct Channel { | |||
103 | int sock; /* sock fd */ | 103 | int sock; /* sock fd */ |
104 | int ctl_chan; /* control channel (multiplexed connections) */ | 104 | int ctl_chan; /* control channel (multiplexed connections) */ |
105 | int isatty; /* rfd is a tty */ | 105 | int isatty; /* rfd is a tty */ |
106 | #ifdef _AIX | ||
106 | int wfd_isatty; /* wfd is a tty */ | 107 | int wfd_isatty; /* wfd is a tty */ |
108 | #endif | ||
107 | int client_tty; /* (client) TTY has been requested */ | 109 | int client_tty; /* (client) TTY has been requested */ |
108 | int force_drain; /* force close on iEOF */ | 110 | int force_drain; /* force close on iEOF */ |
109 | time_t notbefore; /* Pause IO until deadline (time_t) */ | 111 | time_t notbefore; /* Pause IO until deadline (time_t) */ |