mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07:00
rdep-stop-cond
When a service without SIGHUP reload support (noreload) is touched and 'initctl reload' is called, service_update_rdeps() correctly identifies its reverse dependencies but only marks them dirty. It does not clear the service's condition, so when service_step_all() runs: - rdeps supporting SIGHUP hit the sm_in_reload() guard and break early, left running while their dependency is being killed. - rdeps without SIGHUP support may receive SIGTERM too late, after the dependency has already died and broken their connection, causing them to exit from RUNNING state and have their restart counter incremented. Fix by calling cond_clear() on the service's condition immediately in service_update_rdeps(), before service_step_all() runs. cond_clear() calls cond_update() which calls service_step() inline on all affected services, which see COND_OFF and transition to STOPPING_STATE — all before SIGTERM is ever sent to the dependency itself. This mirrors the pattern already used in api.c:do_reload() for direct 'initctl reload <svc>' calls. Fixes: avahi/mdns stop causing mdns-alias restart counter increment Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
…
Finit is a fast, simple alternative to SysV init and systemd, designed for small and embedded Linux systems. It can also run on desktop and server systems, like finix.
Reverse engineered from the EeePC fastinit
"gaps filled with frog DNA …"
— Claudio Matsuoka
For detailed information, explore our extensive documentation
📚 http://finit-project.github.io
For working examples, see the 🚀 contrib/ section or these tutorials:
- 🛠️ Buildroot embedded Linux,
- 📦 Debian GNU/Linux,
- ⛰️ Alpine Linux, and
- 🌌 Void Linux
Note
Finit can run on various Linux distributions, but the bundled install scripts are examples only. They have been tested on amd64 (x86_64) systems with standard configurations.
For embedded systems, see these Buildroot-based examples: myLinux, Infix, or br2-finit-demo.
Languages
C
84.3%
Shell
11.9%
Makefile
2.1%
M4
1.7%

