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