mirror of
https://github.com/troglobit/finit.git
synced 2026-11-17 19:30:29 +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 parent
b1bfab08f3
commit
462d5b22b4
1 file changed
+1
-2
+1
-2
@@ -1405,8 +1405,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
parse_env(svc, env);
|
parse_env(svc, env);
|
||||||
if (file)
|
if (file)
|
||||||
strlcpy(svc->file, file, sizeof(svc->file));
|
strlcpy(svc->file, file, sizeof(svc->file));
|
||||||
if (respawn)
|
svc->respawn = respawn;
|
||||||
svc->respawn = 1;
|
|
||||||
|
|
||||||
/* Set configured limits */
|
/* Set configured limits */
|
||||||
memcpy(svc->rlimit, rlimit, sizeof(svc->rlimit));
|
memcpy(svc->rlimit, rlimit, sizeof(svc->rlimit));
|
||||||
|
|||||||
Reference in new issue
Block a user