diff options
| author | Paul Eggert | 2011-07-06 11:04:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-06 11:04:23 -0700 |
| commit | 123403e42f1a1d556fb33cfd60cbec124d740837 (patch) | |
| tree | b136deab49f587aed6b4f3d583274611b4fbece6 /src/callproc.c | |
| parent | 6db30f83447f4667d2ca84c33979f2745ca96bd5 (diff) | |
| download | emacs-123403e42f1a1d556fb33cfd60cbec124d740837.tar.gz emacs-123403e42f1a1d556fb33cfd60cbec124d740837.zip | |
Use pthread_sigmask, not sigprocmask.
* callproc.c (Fcall_process):
* sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
* process.c (create_process):
sigprocmask is portable only for single-threaded applications, and
Emacs can be multi-threaded when it uses GTK.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/callproc.c b/src/callproc.c index b339f343f62..ad3eddbdd39 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -596,7 +596,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 596 | sigemptyset (&blocked); | 596 | sigemptyset (&blocked); |
| 597 | sigaddset (&blocked, SIGPIPE); | 597 | sigaddset (&blocked, SIGPIPE); |
| 598 | sigaction (SIGPIPE, 0, &sigpipe_action); | 598 | sigaction (SIGPIPE, 0, &sigpipe_action); |
| 599 | sigprocmask (SIG_BLOCK, &blocked, &procmask); | 599 | pthread_sigmask (SIG_BLOCK, &blocked, &procmask); |
| 600 | #endif | 600 | #endif |
| 601 | 601 | ||
| 602 | BLOCK_INPUT; | 602 | BLOCK_INPUT; |
| @@ -633,7 +633,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 633 | in the child. */ | 633 | in the child. */ |
| 634 | //signal (SIGPIPE, SIG_DFL); | 634 | //signal (SIGPIPE, SIG_DFL); |
| 635 | #ifdef HAVE_WORKING_VFORK | 635 | #ifdef HAVE_WORKING_VFORK |
| 636 | sigprocmask (SIG_SETMASK, &procmask, 0); | 636 | pthread_sigmask (SIG_SETMASK, &procmask, 0); |
| 637 | #endif | 637 | #endif |
| 638 | 638 | ||
| 639 | child_setup (filefd, fd1, fd_error, (char **) new_argv, | 639 | child_setup (filefd, fd1, fd_error, (char **) new_argv, |
| @@ -645,7 +645,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 645 | #ifdef HAVE_WORKING_VFORK | 645 | #ifdef HAVE_WORKING_VFORK |
| 646 | /* Restore the signal state. */ | 646 | /* Restore the signal state. */ |
| 647 | sigaction (SIGPIPE, &sigpipe_action, 0); | 647 | sigaction (SIGPIPE, &sigpipe_action, 0); |
| 648 | sigprocmask (SIG_SETMASK, &procmask, 0); | 648 | pthread_sigmask (SIG_SETMASK, &procmask, 0); |
| 649 | #endif | 649 | #endif |
| 650 | 650 | ||
| 651 | #endif /* not WINDOWSNT */ | 651 | #endif /* not WINDOWSNT */ |