Dependents not restarted after SIGHUP reload of service

When 'initctl reload' is called after marking a service in a dependency
chain dirty, Finit fails to restart (unfreeze) affected services.

This patch updates the pidfile plugin to watch for IN_ATTRIB changes,
e.g. when a process uses utimensat() to update its pidfile, and adds
service_step_all() at end of reload cycle to guarantee convergence
after conditions are reasserted.

Issue #476

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-02-17 07:08:30 +01:00
1 parent ab81272083
commit 4bb2c33859
3 files changed
+104 -33

No files matched your search

+12
View File
@@ -510,15 +510,27 @@ restart:
/* Cleanup stale services */
svc_clean_dynamic(service_unregister);
dbg("Step all services waiting for reasserted conditions ...");
service_step_all(SVC_TYPE_ANY);
dbg("Calling reconf hooks ...");
plugin_run_hooks(HOOK_SVC_RECONF);
dbg("Step all services waiting for reasserted conditions ...");
service_step_all(SVC_TYPE_ANY);
dbg("Update configuration generation of device conditions ...");
devmon_reconf();
dbg("Step all services waiting for reasserted conditions ...");
service_step_all(SVC_TYPE_ANY);
dbg("Update configuration generation of unmodified non-native services ...");
service_notify_reconf();
dbg("Step all services waiting for reasserted conditions ...");
service_step_all(SVC_TYPE_ANY);
dbg("Reconfiguration done");
sm.state = SM_RUNNING_STATE;
break;