summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/clientloop.c b/clientloop.c
index 24ea0dec0..95c00f343 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.62 2001/04/14 16:33:20 stevesk Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.63 2001/04/15 17:16:00 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -80,6 +80,7 @@ RCSID("$OpenBSD: clientloop.c,v 1.62 2001/04/14 16:33:20 stevesk Exp $");
80#include "authfd.h" 80#include "authfd.h"
81#include "atomicio.h" 81#include "atomicio.h"
82#include "sshtty.h" 82#include "sshtty.h"
83#include "misc.h"
83 84
84/* import options */ 85/* import options */
85extern Options options; 86extern Options options;
@@ -782,6 +783,13 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
782 max_fd = MAX(connection_in, connection_out); 783 max_fd = MAX(connection_in, connection_out);
783 784
784 if (!compat20) { 785 if (!compat20) {
786 /* enable nonblocking unless tty */
787 if (!isatty(fileno(stdin)))
788 set_nonblock(fileno(stdin));
789 if (!isatty(fileno(stdout)))
790 set_nonblock(fileno(stdout));
791 if (!isatty(fileno(stderr)))
792 set_nonblock(fileno(stderr));
785 max_fd = MAX(max_fd, fileno(stdin)); 793 max_fd = MAX(max_fd, fileno(stdin));
786 max_fd = MAX(max_fd, fileno(stdout)); 794 max_fd = MAX(max_fd, fileno(stdout));
787 max_fd = MAX(max_fd, fileno(stderr)); 795 max_fd = MAX(max_fd, fileno(stderr));