0.9.9.31:
[sbcl.git] / src / runtime / run-program.c
index 7052fe5..110d2b4 100644 (file)
  * files for more information.
  */
 
+#include "sbcl.h"
+
+#ifndef LISP_FEATURE_WIN32
+
 #include <stdlib.h>
 #include <sys/file.h>
 #include <sys/types.h>
+#include <signal.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -54,6 +59,7 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
 {
     int pid = fork();
     int fd;
+    sigset_t sset;
 
     if (pid != 0)
         return pid;
@@ -67,6 +73,10 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
     setpgrp(0, getpid());
 #endif
 
+    /* unblock signals */
+    sigemptyset(&sset);
+    sigprocmask(SIG_SETMASK, &sset, NULL);
+
     /* If we are supposed to be part of some other pty, go for it. */
     if (pty_name) {
 #if !defined(hpux) && !defined(SVR4)
@@ -111,3 +121,4 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
     /* The exec didn't work, flame out. */
     exit(1);
 }
+#endif /* !LISP_FEATURE_WIN32 */