Bug 255198 - daemon: Backport 4cd407ec/366098 -H option to stable/12
Summary: daemon: Backport 4cd407ec/366098 -H option to stable/12
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL: https://reviews.freebsd.org/rS366098
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-18 21:16 UTC by Derek Schrock
Modified: 2021-11-24 23:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2021-04-18 21:16:57 UTC
Would it be possible to backport 4cd407ec/r366098 [1] to stable/12 such that daemon will have -H in future 12.x releases?

12 expected EOL will be ~2024 it would be nice to have this feature in daemon such ports can start using it sooner rather than wait until 12's EOL.

[1] https://reviews.freebsd.org/rS366098
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-04-19 06:32:41 UTC
CC the committer of base r366098
Comment 2 Derek Schrock 2021-04-19 23:47:28 UTC
Looks like 4cd407ec933b can be cherry-picked directly on stable/12.
Comment 3 Derek Schrock 2021-06-05 05:53:50 UTC
ping?
Comment 4 Derek Schrock 2021-07-28 02:00:29 UTC
Any possibilities this can move forward?
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-07-28 12:41:50 UTC
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(-)