X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=signal.h;h=2f3422e2f6e3912350cb92583d5ad01f01e08392;hb=181beb316afad036ac01a778544c5dec0a8d51c7;hp=b5b06f356999062f3b9b233e8303eea33015804a;hpb=837cd1ab890645d9fd7d0d85139fdf076d987ea4;p=paraslash.git diff --git a/signal.h b/signal.h index b5b06f35..2f3422e2 100644 --- a/signal.h +++ b/signal.h @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2007 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2007 Andre Noll , see file COPYING. */ /** \file signal.h exported symbols from signal.c */ @@ -16,6 +12,22 @@ struct signal_task { struct task *task; }; +/** + * A generic pre-select method for signal tasks. + * + * \param s Passed to para_fd_set(). + * \param context Signal task pointer. + * + * This convenience helper is called from several programs which need to handle + * signals, including para_server and para_audiod. These programs define a + * signal task structure and set its ->pre_select method to this function which + * adds the file descriptor of the signal task to the set of descriptors to be + * watched in the next select() call. + * + * Although the second parameter must be in fact a pointer to a signal_task + * structure, the parameter is specified as void * here to match the + * ->pre_select method of struct task. + */ _static_inline_ void signal_pre_select(struct sched *s, void *context) { struct signal_task *st = context; @@ -26,7 +38,7 @@ struct signal_task *signal_init_or_die(void); void para_sigaction(int sig, void (*handler)(int)); void para_install_sighandler(int); int para_reap_child(pid_t *pid); -int para_next_signal(fd_set *rfds); +int para_next_signal(void); void signal_shutdown(struct signal_task *st); void para_block_signal(int sig); void para_unblock_signal(int sig);