From: Richard M. Stallman Date: Wed, 20 Apr 1994 03:49:47 +0000 (+0000) Subject: (create_process): Call setsid only if pty_flag. X-Git-Tag: emacs-19.34~8878 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=39e9ebcd7ff1f9ddeb9fb1d323b20d0eb88ed2fd;p=emacs.git (create_process): Call setsid only if pty_flag. --- diff --git a/src/process.c b/src/process.c index 191425e98fb..c77b537b664 100644 --- a/src/process.c +++ b/src/process.c @@ -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