]> git.eshelyaron.com Git - emacs.git/commitdiff
(create_process): Call setsid only if pty_flag.
authorRichard M. Stallman <rms@gnu.org>
Wed, 20 Apr 1994 03:49:47 +0000 (03:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 20 Apr 1994 03:49:47 +0000 (03:49 +0000)
src/process.c

index 191425e98fb640270565df4fd73944af7370295c..c77b537b664e65d0be4351ce846f2a6ecae4824e 100644 (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