aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/callproc.c b/src/callproc.c
index a92959a1559..2604d295f3e 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#include <config.h> 21#include <config.h>
22#include <errno.h> 22#include <errno.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <setjmp.h>
25#include <sys/types.h> 24#include <sys/types.h>
26#include <unistd.h> 25#include <unistd.h>
27 26
@@ -497,11 +496,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
497 register char **save_environ = environ; 496 register char **save_environ = environ;
498 register int fd1 = fd[1]; 497 register int fd1 = fd[1];
499 int fd_error = fd1; 498 int fd_error = fd1;
500#ifdef HAVE_WORKING_VFORK
501 sigset_t procmask;
502 sigset_t blocked;
503 struct sigaction sigpipe_action;
504#endif
505 499
506 if (fd_output >= 0) 500 if (fd_output >= 0)
507 fd1 = fd_output; 501 fd1 = fd_output;
@@ -588,17 +582,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
588 0, current_dir); 582 0, current_dir);
589#else /* not WINDOWSNT */ 583#else /* not WINDOWSNT */
590 584
591#ifdef HAVE_WORKING_VFORK
592 /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal',
593 this sets the parent's signal handlers as well as the child's.
594 So delay all interrupts whose handlers the child might munge,
595 and record the current handlers so they can be restored later. */
596 sigemptyset (&blocked);
597 sigaddset (&blocked, SIGPIPE);
598 sigaction (SIGPIPE, 0, &sigpipe_action);
599 pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
600#endif
601
602 BLOCK_INPUT; 585 BLOCK_INPUT;
603 586
604 /* vfork, and prevent local vars from being clobbered by the vfork. */ 587 /* vfork, and prevent local vars from being clobbered by the vfork. */
@@ -646,9 +629,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
646 /* GConf causes us to ignore SIGPIPE, make sure it is restored 629 /* GConf causes us to ignore SIGPIPE, make sure it is restored
647 in the child. */ 630 in the child. */
648 signal (SIGPIPE, SIG_DFL); 631 signal (SIGPIPE, SIG_DFL);
649#ifdef HAVE_WORKING_VFORK
650 pthread_sigmask (SIG_SETMASK, &procmask, 0);
651#endif
652 632
653 child_setup (filefd, fd1, fd_error, (char **) new_argv, 633 child_setup (filefd, fd1, fd_error, (char **) new_argv,
654 0, current_dir); 634 0, current_dir);
@@ -656,12 +636,6 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
656 636
657 UNBLOCK_INPUT; 637 UNBLOCK_INPUT;
658 638
659#ifdef HAVE_WORKING_VFORK
660 /* Restore the signal state. */
661 sigaction (SIGPIPE, &sigpipe_action, 0);
662 pthread_sigmask (SIG_SETMASK, &procmask, 0);
663#endif
664
665#endif /* not WINDOWSNT */ 639#endif /* not WINDOWSNT */
666 640
667 /* The MSDOS case did this already. */ 641 /* The MSDOS case did this already. */