]> git.eshelyaron.com Git - emacs.git/commitdiff
(create_process) [HAVE_TERMIOS && LDISC1]: Use tcsetattr.
authorKarl Heuer <kwzh@gnu.org>
Tue, 26 Apr 1994 21:17:19 +0000 (21:17 +0000)
committerKarl Heuer <kwzh@gnu.org>
Tue, 26 Apr 1994 21:17:19 +0000 (21:17 +0000)
src/process.c

index 653e2fe177063163014bf1eec5b2210de29ad78f..8cb89b94d48cfcead639d7d245173d108428fd95 100644 (file)
@@ -1295,6 +1295,16 @@ create_process (process, new_argv, current_dir)
        setpgrp ();
 #endif /* USG */
 #endif /* not HAVE_SETSID */
+#if defined (HAVE_TERMIOS) && defined (LDISC1)
+       if (pty_flag && xforkin >= 0)
+         {
+           struct termios t;
+           tcgetattr (xforkin, &t);
+           t.c_lflag = LDISC1;
+           if (tcsetattr (xforkin, TCSANOW, &t) < 0)
+             write (1, "create_process/tcsetattr LDISC1 failed\n", 39);
+         }
+#else
 #if defined (NTTYDISC) && defined (TIOCSETD)
        if (pty_flag && xforkin >= 0)
          {
@@ -1304,6 +1314,7 @@ create_process (process, new_argv, current_dir)
              write (1, "create_process/TIOCSETD failed\n", 31);
          }
 #endif
+#endif
 #ifdef TIOCNOTTY 
        /* In 4.3BSD, the TIOCSPGRP bug has been fixed, and now you
           can do TIOCSPGRP only to the process's controlling tty.  */