aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorPaul Eggert2011-07-06 11:04:23 -0700
committerPaul Eggert2011-07-06 11:04:23 -0700
commit123403e42f1a1d556fb33cfd60cbec124d740837 (patch)
treeb136deab49f587aed6b4f3d583274611b4fbece6 /src/process.c
parent6db30f83447f4667d2ca84c33979f2745ca96bd5 (diff)
downloademacs-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/process.c')
-rw-r--r--src/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c
index 6bd168d8840..1a884357b86 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1652,7 +1652,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
1652 sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action ); 1652 sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action );
1653#endif 1653#endif
1654#endif /* HAVE_WORKING_VFORK */ 1654#endif /* HAVE_WORKING_VFORK */
1655 sigprocmask (SIG_BLOCK, &blocked, &procmask); 1655 pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
1656 1656
1657 FD_SET (inchannel, &input_wait_mask); 1657 FD_SET (inchannel, &input_wait_mask);
1658 FD_SET (inchannel, &non_keyboard_wait_mask); 1658 FD_SET (inchannel, &non_keyboard_wait_mask);
@@ -1808,7 +1808,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
1808 signal (SIGPIPE, SIG_DFL); 1808 signal (SIGPIPE, SIG_DFL);
1809 1809
1810 /* Stop blocking signals in the child. */ 1810 /* Stop blocking signals in the child. */
1811 sigprocmask (SIG_SETMASK, &procmask, 0); 1811 pthread_sigmask (SIG_SETMASK, &procmask, 0);
1812 1812
1813 if (pty_flag) 1813 if (pty_flag)
1814 child_setup_tty (xforkout); 1814 child_setup_tty (xforkout);
@@ -1900,7 +1900,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
1900#endif 1900#endif
1901#endif /* HAVE_WORKING_VFORK */ 1901#endif /* HAVE_WORKING_VFORK */
1902 /* Stop blocking signals in the parent. */ 1902 /* Stop blocking signals in the parent. */
1903 sigprocmask (SIG_SETMASK, &procmask, 0); 1903 pthread_sigmask (SIG_SETMASK, &procmask, 0);
1904 1904
1905 /* Now generate the error if vfork failed. */ 1905 /* Now generate the error if vfork failed. */
1906 if (pid < 0) 1906 if (pid < 0)