comparison src/process.c @ 7116:d35b11eed89f

(create_process) [HAVE_TERMIOS && LDISC1]: Use tcsetattr.
author Karl Heuer <kwzh@gnu.org>
date Tue, 26 Apr 1994 21:17:19 +0000
parents 6a55de48ade5
children 3f4fc9d682b4
comparison
equal deleted inserted replaced
7115:9a9e88e65617 7116:d35b11eed89f
1293 afterwards. Otherwise, we lose our controlling tty which 1293 afterwards. Otherwise, we lose our controlling tty which
1294 is set when we open the pty. */ 1294 is set when we open the pty. */
1295 setpgrp (); 1295 setpgrp ();
1296 #endif /* USG */ 1296 #endif /* USG */
1297 #endif /* not HAVE_SETSID */ 1297 #endif /* not HAVE_SETSID */
1298 #if defined (HAVE_TERMIOS) && defined (LDISC1)
1299 if (pty_flag && xforkin >= 0)
1300 {
1301 struct termios t;
1302 tcgetattr (xforkin, &t);
1303 t.c_lflag = LDISC1;
1304 if (tcsetattr (xforkin, TCSANOW, &t) < 0)
1305 write (1, "create_process/tcsetattr LDISC1 failed\n", 39);
1306 }
1307 #else
1298 #if defined (NTTYDISC) && defined (TIOCSETD) 1308 #if defined (NTTYDISC) && defined (TIOCSETD)
1299 if (pty_flag && xforkin >= 0) 1309 if (pty_flag && xforkin >= 0)
1300 { 1310 {
1301 /* Use new line discipline. */ 1311 /* Use new line discipline. */
1302 int ldisc = NTTYDISC; 1312 int ldisc = NTTYDISC;
1303 if (ioctl (xforkin, TIOCSETD, &ldisc) < 0) 1313 if (ioctl (xforkin, TIOCSETD, &ldisc) < 0)
1304 write (1, "create_process/TIOCSETD failed\n", 31); 1314 write (1, "create_process/TIOCSETD failed\n", 31);
1305 } 1315 }
1316 #endif
1306 #endif 1317 #endif
1307 #ifdef TIOCNOTTY 1318 #ifdef TIOCNOTTY
1308 /* In 4.3BSD, the TIOCSPGRP bug has been fixed, and now you 1319 /* In 4.3BSD, the TIOCSPGRP bug has been fixed, and now you
1309 can do TIOCSPGRP only to the process's controlling tty. */ 1320 can do TIOCSPGRP only to the process's controlling tty. */
1310 if (pty_flag) 1321 if (pty_flag)