From e2f070649d7b24ee9df0adbeeb387130d23de9ef Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 12 Aug 2022 13:39:52 +0200 Subject: [PATCH] Fix wrong path to command in service after reload, may have changed Service/task/run are today identified by name:id this means the path to a command is not necessarily the basis for the identity. Hence, an svc_t can now be updated with new the correct path to a command. Signed-off-by: Joachim Wiberg --- src/service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service.c b/src/service.c index ae987e11..ce9c2815 100644 --- a/src/service.c +++ b/src/service.c @@ -1382,6 +1382,9 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file) /* update type, may have changed from service -> task */ svc->type = type; + /* update path, may have changed on reload */ + strlcpy(svc->cmd, cmd, sizeof(svc->cmd)); + /* e.g., if missing cmd or env before */ if (!manual) svc_unblock(svc);