]> git.eshelyaron.com Git - emacs.git/commitdiff
(create_process) [RTU || UNIPLUS || DONT_REOPEN_PTY]:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 21 Sep 2005 08:03:30 +0000 (08:03 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Wed, 21 Sep 2005 08:03:30 +0000 (08:03 +0000)
Setup slave tty options before forking.

src/process.c

index 18a446e956194581a101bf40446818bc6fc4f5b8..6f41788a45ce39239fa6f346018dac3fb3b11e73 100644 (file)
@@ -1793,6 +1793,12 @@ create_process (process, new_argv, current_dir)
 #endif
       if (forkin < 0)
        report_file_error ("Opening pty", Qnil);
+#if defined (RTU) || defined (UNIPLUS) || defined (DONT_REOPEN_PTY)
+      /* In the case that vfork is defined as fork, the parent process
+        (Emacs) may send some data before the child process completes
+        tty options setup.  So we setup tty before forking.  */
+      child_setup_tty (forkout);
+#endif /* RTU or UNIPLUS or DONT_REOPEN_PTY */
 #else
       forkin = forkout = -1;
 #endif /* not USG, or USG_SUBTTY_WORKS */
@@ -2077,8 +2083,10 @@ create_process (process, new_argv, current_dir)
 #endif /* SIGCHLD */
 #endif /* !POSIX_SIGNALS */
 
+#if !defined (RTU) && !defined (UNIPLUS) && !defined (DONT_REOPEN_PTY)
        if (pty_flag)
          child_setup_tty (xforkout);
+#endif /* not RTU and not UNIPLUS and not DONT_REOPEN_PTY */
 #ifdef WINDOWSNT
        pid = child_setup (xforkin, xforkout, xforkout,
                           new_argv, 1, current_dir);