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