diff options
Diffstat (limited to 'initd')
-rw-r--r-- | initd/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/initd/main.c b/initd/main.c index efd3a30..9ce23c0 100644 --- a/initd/main.c +++ b/initd/main.c @@ -43,6 +43,16 @@ static void handle_exited(service_t *svc) break; } + if (svc->rspwn_limit > 0) { + svc->rspwn_limit -= 1; + + if (svc->rspwn_limit == 0) { + print_status(svc->desc, STATUS_FAIL, false); + delsvc(svc); + break; + } + } + svc->pid = runlst(svc->exec, svc->num_exec, svc->ctty); if (svc->pid == -1) { print_status(svc->desc, STATUS_FAIL, false); |