diff options
author | sem <sem@FreeBSD.org> | 2008-12-18 23:41:14 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2008-12-18 23:41:14 +0800 |
commit | 37c303a6ac898bc9978970e5d8d7c5dfeabcf3a5 (patch) | |
tree | 3dda7597723433221720aeb38f7313f520d3b7d7 /dns/unbound | |
parent | 505764b85a4bd6a3b79dfbde98d3d5e0fde8c7b7 (diff) | |
download | freebsd-ports-gnome-37c303a6ac898bc9978970e5d8d7c5dfeabcf3a5.tar.gz freebsd-ports-gnome-37c303a6ac898bc9978970e5d8d7c5dfeabcf3a5.tar.zst freebsd-ports-gnome-37c303a6ac898bc9978970e5d8d7c5dfeabcf3a5.zip |
- Fix reopening log after SIGHUP
Diffstat (limited to 'dns/unbound')
-rw-r--r-- | dns/unbound/Makefile | 1 | ||||
-rw-r--r-- | dns/unbound/files/patch-daemon-unbound.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/dns/unbound/Makefile b/dns/unbound/Makefile index e2713c174d3e..e033b82e39d6 100644 --- a/dns/unbound/Makefile +++ b/dns/unbound/Makefile @@ -7,6 +7,7 @@ PORTNAME= unbound PORTVERSION= 1.1.1 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= http://unbound.net/downloads/ diff --git a/dns/unbound/files/patch-daemon-unbound.c b/dns/unbound/files/patch-daemon-unbound.c new file mode 100644 index 000000000000..65744c811fbb --- /dev/null +++ b/dns/unbound/files/patch-daemon-unbound.c @@ -0,0 +1,24 @@ +--- daemon/unbound.c.orig 2008-11-20 12:48:36.000000000 +0300 ++++ daemon/unbound.c 2008-12-18 17:36:58.000000000 +0300 +@@ -345,8 +345,6 @@ + * a fork error could not be printed since daemonize closed stderr.*/ + if(cfg->use_syslog) { + log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir); +- /* but syslog is not really opened by glibc until first msg */ +- log_info("open syslog, startup in progress"); + } + /* if using a logfile, we cannot open it because the logfile would + * be created with the wrong permissions, we cannot chown it because +@@ -516,7 +514,11 @@ + 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); + |