diff options
author | Damien Miller <djm@mindrot.org> | 2013-08-01 14:29:20 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-08-01 14:29:20 +1000 |
commit | c192a4c4f6da907dc0e67a3ca61d806f9a92c931 (patch) | |
tree | c9ea84bd9379a08bb53ee8051a69c597cec8da15 /channels.c | |
parent | 81f7cf1ec5bc2fd202eda05abc2e5361c54633c5 (diff) |
- (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non-
blocking connecting socket will clear any stored errno that might
otherwise have been retrievable via getsockopt(). A hack to limit writes
to TTYs on AIX was triggering this. Since only AIX needs the hack, wrap
it in an #ifdef. Diagnosis and patch from Ivo Raisr.
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |