daemon(8): Make daemon aware of log rotation

Operating Systems / DragonFlyBSD - Peeter Must [gmail.com] - 10 May 2020 08:49 EDT

- Make daemon listen to SIGUSR1 so that when newsyslog has finished log rotation, it can send SIGUSR1 to daemon, who can then reopen the log file specified by the '-o' option.

- Failure to open the log file will be logged through syslog with LOG_NOTICE. The next attempt to reopen the log file will be made upon receiving signal SIGUSR1.

9f0202884c daemon(8): Make daemon aware of log rotation
usr.sbin/daemon/daemon.c | 57 +++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 54 insertions(+), 3 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share