From: Richard M. Stallman Date: Sat, 25 Dec 1993 01:44:47 +0000 (+0000) Subject: (create_process) [NTTYDISC]: Set the tty line discipline. X-Git-Tag: emacs-19.34~10504 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=000ab717b0c940bdacc0875c27f1dc44ace08ac3;p=emacs.git (create_process) [NTTYDISC]: Set the tty line discipline. --- diff --git a/src/process.c b/src/process.c index 107bc05d28a..031bca2faab 100644 --- a/src/process.c +++ b/src/process.c @@ -1236,12 +1236,20 @@ create_process (process, new_argv, current_dir) #endif #else /* not HAVE_SETSID */ #ifdef USG - /* It's very important to call setpgrp() here and no time + /* It's very important to call setpgrp here and no time afterwards. Otherwise, we lose our controlling tty which is set when we open the pty. */ setpgrp (); #endif /* USG */ #endif /* not HAVE_SETSID */ +#ifdef NTTYDISC + { + /* Use new line discipline. */ + int ldisc = NTTYDISC; + if (ioctl (xforkin, TIOCSETD, &ldisc) < 0) + write (1, "create_process/TIOCSETD failed\n", 31); + } +#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. */