mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-02 02:10:46 -08:00
(create_process): Call setsid only if pty_flag.
This commit is contained in:
parent
c3c0ee937d
commit
39e9ebcd7f
1 changed files with 7 additions and 5 deletions
|
|
@ -1274,14 +1274,16 @@ create_process (process, new_argv, current_dir)
|
|||
#ifdef HAVE_PTYS
|
||||
/* First, disconnect its current controlling terminal. */
|
||||
#ifdef HAVE_SETSID
|
||||
setsid ();
|
||||
#ifdef TIOCSCTTY
|
||||
/* Make the pty's terminal the controlling terminal. */
|
||||
if (pty_flag)
|
||||
/* We ignore the return value
|
||||
because faith@cs.unc.edu says that is necessary on Linux. */
|
||||
ioctl (xforkin, TIOCSCTTY, 0);
|
||||
{
|
||||
setsid ();
|
||||
#ifdef TIOCSCTTY
|
||||
/* We ignore the return value
|
||||
because faith@cs.unc.edu says that is necessary on Linux. */
|
||||
ioctl (xforkin, TIOCSCTTY, 0);
|
||||
#endif
|
||||
}
|
||||
#else /* not HAVE_SETSID */
|
||||
#ifdef USG
|
||||
/* It's very important to call setpgrp here and no time
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue