1 /* Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
3 /** \file signal.h exported symbols from signal.c */
6 * Task for signal handling.
9 /** The signal pipe. */
11 /** The associated task structure. */
16 * Monitor the signal fd for reading.
18 * \param s The scheduler instance.
19 * \param context Signal task pointer.
21 * This convenience helper is called from several programs which need to handle
22 * signals, including para_server and para_audiod. These programs set up a
23 * signal pipe and a signal task structure, and use this function to tell the
24 * scheduler to monitor the read end of the pipe.
26 * Although the second parameter must be in fact a pointer to a signal_task
27 * structure, the parameter is specified as void * here to match the signature
28 * declared in struct \ref task_info.
30 _static_inline_ void signal_pre_monitor(struct sched *s, void *context)
32 struct signal_task *st = context;
33 sched_monitor_readfd(st->fd, s);
36 struct signal_task *signal_init_or_die(void);
37 void para_sigaction(int sig, void (*handler)(int));
38 void para_install_sighandler(int);
39 int para_reap_child(pid_t *pid);
40 int para_next_signal(void);
41 void signal_shutdown(struct signal_task *st);
42 void para_block_signal(int sig);
43 void para_unblock_signal(int sig);