opnsense-src/usr.sbin/daemon/tests
Kyle Evans e310a825c9 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)
2024-12-10 17:00:03 -06:00
..
daemon_test.sh daemon: tests: add a test for missed SIGTERM 2024-12-10 17:00:03 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00