aboutsummaryrefslogtreecommitdiff
path: root/networking/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/telnet.c')
-rw-r--r--networking/telnet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/telnet.c b/networking/telnet.c
index b357e690c..3a06c167c 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -121,7 +121,7 @@ static void conescape(void)
121 " z suspend telnet\r\n" 121 " z suspend telnet\r\n"
122 " e exit telnet\r\n"); 122 " e exit telnet\r\n");
123 123
124 if (read(0, &b, 1) <= 0) 124 if (read(STDIN_FILENO, &b, 1) <= 0)
125 doexit(EXIT_FAILURE); 125 doexit(EXIT_FAILURE);
126 126
127 switch (b) { 127 switch (b) {
@@ -256,7 +256,7 @@ static void handlenetinput(int len)
256 } 256 }
257 257
258 if (len) 258 if (len)
259 write(1, G.buf, len); 259 write(STDOUT_FILENO, G.buf, len);
260} 260}
261 261
262static void putiac(int c) 262static void putiac(int c)
@@ -601,7 +601,7 @@ int telnet_main(int argc, char **argv)
601 ufds[0].events = ufds[1].events = POLLIN; 601 ufds[0].events = ufds[1].events = POLLIN;
602#else 602#else
603 FD_ZERO(&readfds); 603 FD_ZERO(&readfds);
604 FD_SET(0, &readfds); 604 FD_SET(STDIN_FILENO, &readfds);
605 FD_SET(G.netfd, &readfds); 605 FD_SET(G.netfd, &readfds);
606 maxfd = G.netfd + 1; 606 maxfd = G.netfd + 1;
607#endif 607#endif
@@ -629,10 +629,10 @@ int telnet_main(int argc, char **argv)
629#ifdef USE_POLL 629#ifdef USE_POLL
630 if (ufds[0].revents) /* well, should check POLLIN, but ... */ 630 if (ufds[0].revents) /* well, should check POLLIN, but ... */
631#else 631#else
632 if (FD_ISSET(0, &rfds)) 632 if (FD_ISSET(STDIN_FILENO, &rfds))
633#endif 633#endif
634 { 634 {
635 len = read(0, G.buf, DATABUFSIZE); 635 len = read(STDIN_FILENO, G.buf, DATABUFSIZE);
636 if (len <= 0) 636 if (len <= 0)
637 doexit(EXIT_SUCCESS); 637 doexit(EXIT_SUCCESS);
638 TRACE(0, ("Read con: %d\n", len)); 638 TRACE(0, ("Read con: %d\n", len));