Consider a service dirty if the command line args have changed

This fixes `initctl reload` correctly restarting all daemons that have new
command line arguments.

Previously command line arguments changes were only acted upon if the
service was explicitly reloaded `initctl reload myservice`.
This commit is contained in:
Jack Newman committed 2023-01-04 13:31:41 +10:00
1 parent 9887003b25
commit b9e94e4695
1 file changed
+1 -1
+1 -1
View File
@@ -1666,7 +1666,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
parse_cgroup(svc, cgroup);
/* New, recently modified or unchanged ... used on reload. */
if ((file && conf_changed(file)) || conf_changed(svc_getenv(svc)))
if ((file && conf_changed(file)) || conf_changed(svc_getenv(svc)) || svc->args_dirty)
svc_mark_dirty(svc);
else
svc_mark_clean(svc);