+2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ 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.
+
2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
* xsettings.c: Use both GConf and GSettings if both are available.
sigemptyset (&blocked);
sigaddset (&blocked, SIGPIPE);
sigaction (SIGPIPE, 0, &sigpipe_action);
- sigprocmask (SIG_BLOCK, &blocked, &procmask);
+ pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
#endif
BLOCK_INPUT;
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,
#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 */
sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action );
#endif
#endif /* HAVE_WORKING_VFORK */
- sigprocmask (SIG_BLOCK, &blocked, &procmask);
+ pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
FD_SET (inchannel, &input_wait_mask);
FD_SET (inchannel, &non_keyboard_wait_mask);
signal (SIGPIPE, SIG_DFL);
/* Stop blocking signals in the child. */
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
if (pty_flag)
child_setup_tty (xforkout);
#endif
#endif /* HAVE_WORKING_VFORK */
/* Stop blocking signals in the parent. */
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
/* Now generate the error if vfork failed. */
if (pid < 0)
sys_sigblock (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_BLOCK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask);
return (old_mask);
}
sys_sigunblock (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_UNBLOCK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_UNBLOCK, &new_mask, &old_mask);
return (old_mask);
}
sys_sigsetmask (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_SETMASK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_SETMASK, &new_mask, &old_mask);
return (old_mask);
}