aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-20 03:49:47 +0000
committerRichard M. Stallman1994-04-20 03:49:47 +0000
commit39e9ebcd7ff1f9ddeb9fb1d323b20d0eb88ed2fd (patch)
tree687dbccd616c13dd12e660fc3ee75b3ca6bfa91d /src/process.c
parentc3c0ee937dab6fcde866b13bf8a56d0c5244d169 (diff)
downloademacs-39e9ebcd7ff1f9ddeb9fb1d323b20d0eb88ed2fd.tar.gz
emacs-39e9ebcd7ff1f9ddeb9fb1d323b20d0eb88ed2fd.zip
(create_process): Call setsid only if pty_flag.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c12
1 files changed, 7 insertions, 5 deletions
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)
1274#ifdef HAVE_PTYS 1274#ifdef HAVE_PTYS
1275 /* First, disconnect its current controlling terminal. */ 1275 /* First, disconnect its current controlling terminal. */
1276#ifdef HAVE_SETSID 1276#ifdef HAVE_SETSID
1277 setsid ();
1278#ifdef TIOCSCTTY
1279 /* Make the pty's terminal the controlling terminal. */ 1277 /* Make the pty's terminal the controlling terminal. */
1280 if (pty_flag) 1278 if (pty_flag)
1281 /* We ignore the return value 1279 {
1282 because faith@cs.unc.edu says that is necessary on Linux. */ 1280 setsid ();
1283 ioctl (xforkin, TIOCSCTTY, 0); 1281#ifdef TIOCSCTTY
1282 /* We ignore the return value
1283 because faith@cs.unc.edu says that is necessary on Linux. */
1284 ioctl (xforkin, TIOCSCTTY, 0);
1284#endif 1285#endif
1286 }
1285#else /* not HAVE_SETSID */ 1287#else /* not HAVE_SETSID */
1286#ifdef USG 1288#ifdef USG
1287 /* It's very important to call setpgrp here and no time 1289 /* It's very important to call setpgrp here and no time