aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1992-08-22 02:53:24 +0000
committerRichard M. Stallman1992-08-22 02:53:24 +0000
commitce4c9c9080cbab12a6097b6bcc2e77662668ce8c (patch)
treedaf73d0811191027b095b4ab1e3e1d42bc487f7e /src/process.c
parentd418ef42e13d633b305d351c7a4555052f732aa8 (diff)
downloademacs-ce4c9c9080cbab12a6097b6bcc2e77662668ce8c.tar.gz
emacs-ce4c9c9080cbab12a6097b6bcc2e77662668ce8c.zip
(WCOREDUMP): Define only if not defined.
(create_process) [HAVE_SETSID]: Use TIOCSCTTY if exists.
Diffstat (limited to 'src/process.c')
-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