[Bug 277959] Refactor of usr.sbin/daemon caused regression in restart parameter
Date: Tue, 10 Dec 2024 23:38:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277959 --- Comment #19 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e310a825c933182a5b29261b741467f649951ff1 commit e310a825c933182a5b29261b741467f649951ff1 Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2024-11-19 19:51:27 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2024-12-10 23:00:03 +0000 daemon: tests: add a test for missed SIGTERM This is somewhaht hard to test reliably, but we'll give it a shot. Startup a sleep(1) daemon with a hefty restart delay. In refactoring of daemon(8), we inadvertently started dropping SIGTERMs that came in while we were waiting to restart the child, so we employ the strategy: - Pop the child sleep(1) first - Wait for sleep(1) to exit (pid file truncated) - Pop the daemon(8) with a SIGTERM - Wait for daemon(8) to exit The pidfile is specifically truncated outside of the event loop so that we don't have a kqueue to catch it in the current model. PR: 277959 Reviewed by: des, markj (cherry picked from commit 9ab59e900c1dd693b4d14285389a035e81341789) usr.sbin/daemon/tests/daemon_test.sh | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) -- You are receiving this mail because: You are on the CC list for the bug.