# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1127289810 0 # Node ID 92275ace8eb5b92c78b78a3beffd141559050ea8 # Parent a9f13967f179204023dae9c272eb801868663a47 (create_process) [RTU || UNIPLUS || DONT_REOPEN_PTY]: Setup slave tty options before forking. diff -r a9f13967f179 -r 92275ace8eb5 src/process.c --- a/src/process.c Wed Sep 21 07:20:40 2005 +0000 +++ b/src/process.c Wed Sep 21 08:03:30 2005 +0000 @@ -1793,6 +1793,12 @@ #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 @@ #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);