2 * Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file signal.h exported symbols from signal.c */
10 * Task for signal handling.
13 /** The signal pipe. */
15 /** The associated task structure. */
20 * A generic pre-select method for signal tasks.
22 * \param s Passed to para_fd_set().
23 * \param context Signal task pointer.
25 * This convenience helper is called from several programs which need to handle
26 * signals, including para_server and para_audiod. These programs define a
27 * signal task structure and set its ->pre_select method to this function which
28 * adds the file descriptor of the signal task to the set of descriptors to be
29 * watched in the next select() call.
31 * Although the second parameter must be in fact a pointer to a signal_task
32 * structure, the parameter is specified as void * here to match the
33 * ->pre_select method of struct task.
35 _static_inline_ void signal_pre_select(struct sched *s, void *context)
37 struct signal_task *st = context;
38 para_fd_set(st->fd, &s->rfds, &s->max_fileno);
41 struct signal_task *signal_init_or_die(void);
42 void para_sigaction(int sig, void (*handler)(int));
43 void para_install_sighandler(int);
44 int para_reap_child(pid_t *pid);
45 int para_next_signal(fd_set *rfds);
46 void signal_shutdown(struct signal_task *st);
47 void para_block_signal(int sig);
48 void para_unblock_signal(int sig);