mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +00:00
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:
+1
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user