summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2013-11-15 19:32:31 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-15 19:33:35 +0100
commit93d71ca996eb50b951169414cf541bf0fe4f647e (patch)
tree3aefd36fb6ed324386f217773083d351cd2cab3e
parent916f95cb58604038695347ee41a430d8ca1f0556 (diff)
downloadunitd-93d71ca996eb50b951169414cf541bf0fe4f647e.tar
unitd-93d71ca996eb50b951169414cf541bf0fe4f647e.zip
procd: Allow process respawning forever
Use respawn_retry==0 as indication to respawn a process forever. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--service/instance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/instance.c b/service/instance.c
index 5ac7d57..ab517d7 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -164,7 +164,7 @@ instance_exit(struct uloop_process *p, int ret)
in->respawn_count++;
else
in->respawn_count = 0;
- if (in->respawn_count > in->respawn_retry) {
+ if (in->respawn_count > in->respawn_retry && in->respawn_retry > 0 ) {
LOG("Instance %s::%s s in a crash loop %d crashes, %ld seconds since last crash\n",
in->srv->name, in->name, in->respawn_count, runtime);
in->restart = in->respawn = 0;