Commit 39e9ebcd authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(create_process): Call setsid only if pty_flag.

parent c3c0ee93
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment