mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 04:40:21 +00:00
ldpd: ignore the SIGHUP signal in the child processes
Only the parent process should handle the SIGHUP signal, but we need to make sure that this signal is ignored in the child processes so a command like "killall -SIGHUP ldpd" won't kill ldpd. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
56b8a8d231
commit
1e7e440f5a
@ -105,6 +105,10 @@ sigint(void)
|
||||
|
||||
static struct quagga_signal_t lde_signals[] =
|
||||
{
|
||||
{
|
||||
.signal = SIGHUP,
|
||||
/* ignore */
|
||||
},
|
||||
{
|
||||
.signal = SIGINT,
|
||||
.handler = &sigint,
|
||||
|
@ -87,6 +87,10 @@ sigint(void)
|
||||
|
||||
static struct quagga_signal_t ldpe_signals[] =
|
||||
{
|
||||
{
|
||||
.signal = SIGHUP,
|
||||
/* ignore */
|
||||
},
|
||||
{
|
||||
.signal = SIGINT,
|
||||
.handler = &sigint,
|
||||
|
@ -108,7 +108,8 @@ quagga_sigevent_process (void)
|
||||
if (sig->caught > 0)
|
||||
{
|
||||
sig->caught = 0;
|
||||
sig->handler ();
|
||||
if (sig->handler)
|
||||
sig->handler ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user