From 9cb69874f6dda08707ef7a7b888ca2dd00b40bd4 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 18 Dec 2008 14:36:58 +0000 Subject: [PATCH] fixup reopen of syslog to avoid dev/log dependency and log missing after HUP. git-svn-id: file:///svn/unbound/trunk@1403 be551aaa-1e26-0410-a405-d3ace91eadb9 --- daemon/unbound.c | 6 +++++- doc/Changelog | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/daemon/unbound.c b/daemon/unbound.c index 1083aed13..695fc41b7 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -514,7 +514,11 @@ run_daemon(const char* cfgfile, int cmdline_verbose, int debug_mode) if(!done_setup) { perform_setup(daemon, cfg, debug_mode, &cfgfile); done_setup = 1; - } else log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir); + } else { + /* reopen log after HUP to facilitate log rotation */ + if(!cfg->use_syslog) + log_init(cfg->logfile, 0, cfg->chrootdir); + } /* work */ daemon_fork(daemon); diff --git a/doc/Changelog b/doc/Changelog index 9077fd07a..d51b7328c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -6,6 +6,7 @@ - verbose prints about recursion lame detection and server selection. - fixup BSD port for infra host storage. It hashed wrongly. - fixup makedist snapshot name generation. + - do not reopen syslog to avoid dev/log dependency. 17 December 2008: Wouter - follows ldns makedist.sh. -rc option. autom4te dir removed. -- 2.47.3