1
Fork 0
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:
Richard M. Stallman 1994-04-20 03:49:47 +00:00
parent c3c0ee937d
commit 39e9ebcd7f

View file

@ -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