Fix a number of library and daemon issues so that daemons can
call frr_fini() during normal termination. Without this,
temporary logging files are left behind in /var/tmp/frr/.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
}
/* Delete and free all cancellation requests */
- list_delete_all_node(master->cancel_req);
+ if (master->cancel_req)
+ list_delete_all_node(master->cancel_req);
/* Wake up any threads which may be blocked in thread_cancel_async() */
master->canceled = true;
{
zlog_notice("Terminating on signal");
ospf_terminate();
+ exit(0);
}
/* SIGUSR1 handler. */
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))
zclient_stop(zclient);
zclient_free(zclient);
+done:
frr_fini();
}
{
zlog_notice("Terminating on signal");
+ frr_fini();
+
exit(0);
}
{
zlog_notice("Terminating on signal");
+ frr_fini();
+
exit(0);
}
bool mpls_enabled;
+
zebra_capabilities_t _caps_p[] = {
};
static_vrf_terminate();
+ frr_fini();
+
exit(0);
}
vrrp_fini();
+ frr_fini();
+
exit(0);
}