[Bug 255198] daemon: Backport 4cd407ec/366098 -H option to stable/12
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 Jul 2021 12:41:50 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255198
--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch stable/12 references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=7fa95d69f10827d0b02607682a2c4a1513d658e5
commit 7fa95d69f10827d0b02607682a2c4a1513d658e5
Author: Maxim Sobolev <sobomax@FreeBSD.org>
AuthorDate: 2020-09-24 02:44:58 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-07-28 12:38:38 +0000
dd a new option (-H) to daemon(8) to catch SIGHUP and re-open output_file
file when
received.
The default system log rotation mechanism (newsyslog(8)) requires ability
to send
signal to a daemon in order to properly complete rotation of the logs in an
"atomic"
manner without having to making a copy and truncating original file.
Unfortunately
our built-in mechanism to convert "dumb" programs into daemons has no way
to handle
this rotation properly. This change adds this ability, to be enabled by
supplying -H
option in addition to the -o option.
PR: 255198
Reviewed by: markj, rpokala (manpages)
(cherry picked from commit 4cd407ec933b81d9d0f733532d29426416cccc06)
usr.sbin/daemon/daemon.8 | 18 ++++++++++++--
usr.sbin/daemon/daemon.c | 63 ++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 71 insertions(+), 10 deletions(-)
--
You are receiving this mail because:
You are the assignee for the bug.