aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index dd9c6dbcb42..55ee3373c50 100644
--- a/src/process.c
+++ b/src/process.c
@@ -125,8 +125,10 @@ static Lisp_Object stream_process;
125#define WIFEXITED(w) ((w&0377) == 0) 125#define WIFEXITED(w) ((w&0377) == 0)
126#define WRETCODE(w) (w >> 8) 126#define WRETCODE(w) (w >> 8)
127#define WSTOPSIG(w) (w >> 8) 127#define WSTOPSIG(w) (w >> 8)
128#define WCOREDUMP(w) ((w&0200) != 0)
129#define WTERMSIG(w) (w & 0377) 128#define WTERMSIG(w) (w & 0377)
129#ifndef WCOREDUMP
130#define WCOREDUMP(w) ((w&0200) != 0)
131#endif
130#else 132#else
131#ifdef BSD4_1 133#ifdef BSD4_1
132#include <wait.h> 134#include <wait.h>
@@ -1206,6 +1208,11 @@ create_process (process, new_argv)
1206 /* First, disconnect its current controlling terminal. */ 1208 /* First, disconnect its current controlling terminal. */
1207#ifdef HAVE_SETSID 1209#ifdef HAVE_SETSID
1208 setsid (); 1210 setsid ();
1211#ifdef TIOCSCTTY
1212 /* Make the pty's terminal the controlling terminal. */
1213 if (pty_flag && (ioctl (xforkin, TIOCSCTTY, 0) < 0))
1214 abort ();
1215#endif
1209#else /* not HAVE_SETSID */ 1216#else /* not HAVE_SETSID */
1210#ifdef USG 1217#ifdef USG
1211 /* It's very important to call setpgrp() here and no time 1218 /* It's very important to call setpgrp() here and no time