mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
(WCOREDUMP): Define only if not defined.
(create_process) [HAVE_SETSID]: Use TIOCSCTTY if exists.
This commit is contained in:
parent
d418ef42e1
commit
ce4c9c9080
@ -125,8 +125,10 @@ static Lisp_Object stream_process;
|
||||
#define WIFEXITED(w) ((w&0377) == 0)
|
||||
#define WRETCODE(w) (w >> 8)
|
||||
#define WSTOPSIG(w) (w >> 8)
|
||||
#define WCOREDUMP(w) ((w&0200) != 0)
|
||||
#define WTERMSIG(w) (w & 0377)
|
||||
#ifndef WCOREDUMP
|
||||
#define WCOREDUMP(w) ((w&0200) != 0)
|
||||
#endif
|
||||
#else
|
||||
#ifdef BSD4_1
|
||||
#include <wait.h>
|
||||
@ -1206,6 +1208,11 @@ create_process (process, new_argv)
|
||||
/* First, disconnect its current controlling terminal. */
|
||||
#ifdef HAVE_SETSID
|
||||
setsid ();
|
||||
#ifdef TIOCSCTTY
|
||||
/* Make the pty's terminal the controlling terminal. */
|
||||
if (pty_flag && (ioctl (xforkin, TIOCSCTTY, 0) < 0))
|
||||
abort ();
|
||||
#endif
|
||||
#else /* not HAVE_SETSID */
|
||||
#ifdef USG
|
||||
/* It's very important to call setpgrp() here and no time
|
||||
|
Loading…
Reference in New Issue
Block a user