]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dd a new option (-H) to daemon(8) to catch SIGHUP and re-open output_file file when
authorMaxim Sobolev <sobomax@FreeBSD.org>
Thu, 24 Sep 2020 02:44:58 +0000 (02:44 +0000)
committerMark Johnston <markj@FreeBSD.org>
Wed, 28 Jul 2021 12:38:38 +0000 (08:38 -0400)
commit7fa95d69f10827d0b02607682a2c4a1513d658e5
tree31633c6b20a741d6ef7fd900ef332f7dab9e53d2
parent3312bc6f109d16d082db771c38832649a668c4de
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
usr.sbin/daemon/daemon.c