aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 05048576ce9..792556c8e02 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -52,6 +52,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
52#include "syswait.h" 52#include "syswait.h"
53#include "blockinput.h" 53#include "blockinput.h"
54#include "frame.h" 54#include "frame.h"
55#include "systty.h"
56#include "keyboard.h"
55 57
56#ifdef MSDOS 58#ifdef MSDOS
57#include "msdos.h" 59#include "msdos.h"
@@ -626,7 +628,18 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
626 { 628 {
627 unblock_child_signal (&oldset); 629 unblock_child_signal (&oldset);
628 630
631#ifdef DARWIN_OS
632 /* Darwin doesn't let us run setsid after a vfork, so use
633 TIOCNOTTY when necessary. */
634 int j = emacs_open (DEV_TTY, O_RDWR, 0);
635 if (j >= 0)
636 {
637 ioctl (j, TIOCNOTTY, 0);
638 emacs_close (j);
639 }
640#else
629 setsid (); 641 setsid ();
642#endif
630 643
631 /* Emacs ignores SIGPIPE, but the child should not. */ 644 /* Emacs ignores SIGPIPE, but the child should not. */
632 signal (SIGPIPE, SIG_DFL); 645 signal (SIGPIPE, SIG_DFL);