+2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port signal-handling to DragonFly BSD (Bug#17646).
+ * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
+ Move implementations from callproc.c to sysdep.c.
+ * process.h, syssignal.h (block_child_signal, unblock_child_signal):
+ Move declaratations from process.h to syssignal.h.
+
2014-06-01 Juanma Barranquero <lekktu@gmail.com>
* callint.c (Ffuncall_interactively): Add usage.
static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t);
\f
-
-#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 */
-
/* Return the current buffer's working directory, or the home
directory if it's unreachable, as a string suitable for a system call.
Signal an error if the result would not be an accessible directory. */
/* Defined in callproc.c. */
-extern void block_child_signal (sigset_t *);
-extern void unblock_child_signal (sigset_t const *);
extern Lisp_Object encode_current_directory (void);
extern void record_kill_process (struct Lisp_Process *, Lisp_Object);
signal (SIGIO, SIG_IGN);
#endif
}
+\f
+#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 */
\f
/* Saving and restoring the process group of Emacs's terminal. */
#include <signal.h>
extern void init_signals (bool);
+extern void block_child_signal (sigset_t *);
+extern void unblock_child_signal (sigset_t const *);
extern void block_tty_out_signal (sigset_t *);
extern void unblock_tty_out_signal (sigset_t const *);