summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-06 11:04:23 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-06 11:04:23 -0700
commit123403e42f1a1d556fb33cfd60cbec124d740837 (patch)
treeb136deab49f587aed6b4f3d583274611b4fbece6 /src/callproc.c
parent6db30f83447f4667d2ca84c33979f2745ca96bd5 (diff)
downloademacs-123403e42f1a1d556fb33cfd60cbec124d740837.tar.gz
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.c6
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) */)
sigemptyset (&blocked);
sigaddset (&blocked, SIGPIPE);
sigaction (SIGPIPE, 0, &sigpipe_action);
- sigprocmask (SIG_BLOCK, &blocked, &procmask);
+ pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
#endif
BLOCK_INPUT;
@@ -633,7 +633,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
in the child. */
//signal (SIGPIPE, SIG_DFL);
#ifdef HAVE_WORKING_VFORK
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
#endif
child_setup (filefd, fd1, fd_error, (char **) new_argv,
@@ -645,7 +645,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
#ifdef HAVE_WORKING_VFORK
/* Restore the signal state. */
sigaction (SIGPIPE, &sigpipe_action, 0);
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
#endif
#endif /* not WINDOWSNT */