]>
git.proxmox.com Git - mirror_frr.git/blob - lib/sigevent.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Quagga Signal handling header.
5 * Copyright (C) 2004 Paul Jakma.
17 #define FRR_SIGNAL_TIMER_INTERVAL 2L
20 int signal
; /* signal number */
21 void (*handler
)(void); /* handler to call */
23 volatile sig_atomic_t caught
; /* private member */
26 /* initialise sigevent system
28 * - pointer to valid struct event_loop
29 * - number of elements in passed in signals array
30 * - array of frr_signal_t's describing signals to handle
31 * and handlers to use for each signal
33 extern void signal_init(struct event_loop
*m
, int sigc
,
34 struct frr_signal_t
*signals
);
38 * Check whether any signals have been received and are pending. This is done
39 * with the application's key signals blocked. The complete set of signals
40 * is returned in 'setp', so the caller can restore them when appropriate.
41 * If there are pending signals, returns 'true', 'false' otherwise.
43 bool frr_sigevent_check(sigset_t
*setp
);
45 /* check whether there are signals to handle, process any found */
46 extern int frr_sigevent_process(void);
52 #endif /* _FRR_SIGNAL_H */