ldpd: clean up temp zlog files

Clean up the temp zlog dirs in /var/tmp/frr/ that the ldpd
child processes were leaving. The child processes do a non-
standard lib init/deinit, so they need to explicitly deinit
the zlog module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2020-06-17 10:00:03 -04:00
parent 8803809f0b
commit b12a63f120
3 changed files with 7 additions and 1 deletions

View File

@ -206,6 +206,8 @@ lde_shutdown(void)
free(iev_main_sync);
log_info("label decision engine exiting");
zlog_fini();
exit(0);
}

View File

@ -495,7 +495,8 @@ start_child(enum ldpd_process p, char *argv0, int fd_async, int fd_sync)
int argc = 0, nullfd;
pid_t pid;
switch (pid = fork()) {
pid = fork();
switch (pid) {
case -1:
fatal("cannot fork");
case 0:

View File

@ -235,6 +235,9 @@ ldpe_shutdown(void)
free(pkt_ptr);
log_info("ldp engine exiting");
zlog_fini();
exit(0);
}