summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-06 08:28:16 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-15 13:25:44 +0200
commit03951374770da5be620e48768588928fbd809c83 (patch)
treee2234dd2ace2aa632646729dc5956901426d7f19 /nhrpd
parentlib: hooks: support priority ordering & reversing (diff)
downloadfrr-03951374770da5be620e48768588928fbd809c83.tar.xz
frr-03951374770da5be620e48768588928fbd809c83.zip
*: centralize some exit cleanup into libfrr
Start creating a counterpart to frr_init and frr_late_init. Unfortunately, some daemons don't do any exit handling, this doesn't change that just yet. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/nhrp_main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c
index 012d5cd87..3a7186c1d 100644
--- a/nhrpd/nhrp_main.c
+++ b/nhrpd/nhrp_main.c
@@ -81,6 +81,7 @@ static void nhrp_sigusr1(void)
static void nhrp_request_stop(void)
{
debugf(NHRP_DEBUG_COMMON, "Exiting...");
+ frr_early_fini();
nhrp_shortcut_terminate();
nhrp_nhs_terminate();
@@ -89,15 +90,9 @@ static void nhrp_request_stop(void)
evmgr_terminate();
nhrp_vc_terminate();
vrf_terminate();
- /* memory_terminate(); */
- /* vty_terminate(); */
- cmd_terminate();
- /* signal_terminate(); */
- zprivs_terminate(&nhrpd_privs);
debugf(NHRP_DEBUG_COMMON, "Done.");
-
- closezlog();
+ frr_fini();
exit(0);
}