Fix parse bug, always set service's respawn flag

Before this fix, a service declared with respawn could not be changed at
runtime to remove the respawn flag.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-04-04 18:06:35 +02:00
parent b1bfab08f3
commit 462d5b22b4
+1 -2
View File
@@ -1405,8 +1405,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
parse_env(svc, env);
if (file)
strlcpy(svc->file, file, sizeof(svc->file));
if (respawn)
svc->respawn = 1;
svc->respawn = respawn;
/* Set configured limits */
memcpy(svc->rlimit, rlimit, sizeof(svc->rlimit));