]>
git.proxmox.com Git - mirror_frr.git/blob - lib/sigevent.h
2 * Quagga Signal handling header.
4 * Copyright (C) 2004 Paul Jakma.
6 * This file is part of Quagga.
8 * Quagga is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * Quagga is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 #define FRR_SIGNAL_TIMER_INTERVAL 2L
35 int signal
; /* signal number */
36 void (*handler
)(void); /* handler to call */
38 volatile sig_atomic_t caught
; /* private member */
41 /* initialise sigevent system
43 * - pointer to valid struct thread_master
44 * - number of elements in passed in signals array
45 * - array of frr_signal_t's describing signals to handle
46 * and handlers to use for each signal
48 extern void signal_init(struct thread_master
*m
, int sigc
,
49 struct frr_signal_t
*signals
);
53 * Check whether any signals have been received and are pending. This is done
54 * with the application's key signals blocked. The complete set of signals
55 * is returned in 'setp', so the caller can restore them when appropriate.
56 * If there are pending signals, returns 'true', 'false' otherwise.
58 bool frr_sigevent_check(sigset_t
*setp
);
60 /* check whether there are signals to handle, process any found */
61 extern int frr_sigevent_process(void);
67 #endif /* _FRR_SIGNAL_H */