]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fixup reopen of syslog to avoid dev/log dependency and log missing after HUP.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 18 Dec 2008 14:36:58 +0000 (14:36 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 18 Dec 2008 14:36:58 +0000 (14:36 +0000)
git-svn-id: file:///svn/unbound/trunk@1403 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/unbound.c
doc/Changelog

index 1083aed131103dabd1c55cd6cc719f587c4bff34..695fc41b76b8daeb2031dcb631431f98b21de49f 100644 (file)
@@ -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);
 
index 9077fd07a0064755b04eec045c445d00dafd5601..d51b7328cdafffb107c97d917c22b17f0f62fe65 100644 (file)
@@ -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.