# HG changeset patch # User Richard M. Stallman # Date 766813787 0 # Node ID b7411e378b650a042879ac212a8d1224cec7223e # Parent ab22b527d38047d8293d89731744df4ebb5bc4ca (create_process): Call setsid only if pty_flag. diff -r ab22b527d380 -r b7411e378b65 src/process.c --- a/src/process.c Wed Apr 20 03:04:46 1994 +0000 +++ b/src/process.c Wed Apr 20 03:49:47 1994 +0000 @@ -1274,14 +1274,16 @@ #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