summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 573d419970..480813e6cb 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -659,7 +659,29 @@ ignore_sigio (void)
signal (SIGIO, SIG_IGN);
#endif
}
+
+#ifndef MSDOS
+/* Block SIGCHLD. */
+
+void
+block_child_signal (sigset_t *oldset)
+{
+ sigset_t blocked;
+ sigemptyset (&blocked);
+ sigaddset (&blocked, SIGCHLD);
+ sigaddset (&blocked, SIGINT);
+ pthread_sigmask (SIG_BLOCK, &blocked, oldset);
+}
+
+/* Unblock SIGCHLD. */
+
+void
+unblock_child_signal (sigset_t const *oldset)
+{
+ pthread_sigmask (SIG_SETMASK, oldset, 0);
+}
+#endif /* !MSDOS */
/* Saving and restoring the process group of Emacs's terminal. */