mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 10:04:18 +00:00
Merge pull request #6570 from mjstapp/fix_daemon_fini_7_4
[7.4] Daemons should call frr_fini() on shutdown
This commit is contained in:
commit
e28f42625e
@ -406,9 +406,11 @@ static void zprivs_caps_init(struct zebra_privs_t *zprivs)
|
||||
|
||||
static void zprivs_caps_terminate(void)
|
||||
{
|
||||
/* clear all capabilities */
|
||||
/* Clear all capabilities, if we have any. */
|
||||
if (zprivs_state.caps)
|
||||
cap_clear(zprivs_state.caps);
|
||||
else
|
||||
return;
|
||||
|
||||
/* and boom, capabilities are gone forever */
|
||||
if (cap_set_proc(zprivs_state.caps)) {
|
||||
|
@ -1094,6 +1094,7 @@ static void do_thread_cancel(struct thread_master *master)
|
||||
}
|
||||
|
||||
/* Delete and free all cancellation requests */
|
||||
if (master->cancel_req)
|
||||
list_delete_all_node(master->cancel_req);
|
||||
|
||||
/* Wake up any threads which may be blocked in thread_cancel_async() */
|
||||
|
@ -98,6 +98,7 @@ static void sigint(void)
|
||||
{
|
||||
zlog_notice("Terminating on signal");
|
||||
ospf_terminate();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* SIGUSR1 handler. */
|
||||
|
@ -517,9 +517,9 @@ void ospf_terminate(void)
|
||||
|
||||
SET_FLAG(om->options, OSPF_MASTER_SHUTDOWN);
|
||||
|
||||
/* exit immediately if OSPF not actually running */
|
||||
/* Skip some steps if OSPF not actually running */
|
||||
if (listcount(om->ospf) == 0)
|
||||
exit(0);
|
||||
goto done;
|
||||
|
||||
bfd_gbl_exit();
|
||||
for (ALL_LIST_ELEMENTS(om->ospf, node, nnode, ospf))
|
||||
@ -543,6 +543,7 @@ void ospf_terminate(void)
|
||||
zclient_stop(zclient);
|
||||
zclient_free(zclient);
|
||||
|
||||
done:
|
||||
frr_fini();
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,8 @@ static void sigint(void)
|
||||
{
|
||||
zlog_notice("Terminating on signal");
|
||||
|
||||
frr_fini();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,8 @@ static void sigint(void)
|
||||
{
|
||||
zlog_notice("Terminating on signal");
|
||||
|
||||
frr_fini();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ char backup_config_file[256];
|
||||
|
||||
bool mpls_enabled;
|
||||
|
||||
|
||||
zebra_capabilities_t _caps_p[] = {
|
||||
};
|
||||
|
||||
@ -75,6 +76,8 @@ static void sigint(void)
|
||||
|
||||
static_vrf_terminate();
|
||||
|
||||
frr_fini();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,8 @@ static void __attribute__((noreturn)) sigint(void)
|
||||
|
||||
vrrp_fini();
|
||||
|
||||
frr_fini();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user