lib: rotate log file supplied by command line

Call `zlog_file_rotate` for command file lines as well otherwise on
`SIGUSR1` the old descriptor will still be used and no new log file will
be created for the rotation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2022-01-11 15:39:11 -03:00 committed by Rafael F. Zalamena
parent 4190587a3f
commit 3c1f92018b

View File

@ -159,6 +159,7 @@ void zlog_rotate(void)
{ {
zlog_file_rotate(&zt_file); zlog_file_rotate(&zt_file);
zlog_file_rotate(&zt_filterfile.parent); zlog_file_rotate(&zt_filterfile.parent);
zlog_file_rotate(&zt_file_cmdline);
hook_call(zlog_rotate); hook_call(zlog_rotate);
} }