Summary: | daemon: Backport 4cd407ec/366098 -H option to stable/12 | ||
---|---|---|---|
Product: | Base System | Reporter: | Derek Schrock <dereks> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | lwhsu, sobomax |
Priority: | --- | ||
Version: | 12.2-STABLE | ||
Hardware: | Any | ||
OS: | Any | ||
URL: | https://reviews.freebsd.org/rS366098 |
Description
Derek Schrock
2021-04-18 21:16:57 UTC
CC the committer of base r366098 Looks like 4cd407ec933b can be cherry-picked directly on stable/12. ping? Any possibilities this can move forward? 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(-) |