Enable procd to restrict the execution time of a rc scripts during shutdown, even
when a script ignores the SIGTERM signal by insisting after 10s with a SIGKILL.
Signed-off-by: Jurgen Van Ham <juvanham.tc@gmail.com>
}
s->proc.task.type = &initd_type;
s->proc.task.complete = q_initd_complete;
- if (!strcmp(param, "stop") || !strcmp(param, "shutdown"))
+ if (!strcmp(param, "stop") || !strcmp(param, "shutdown")) {
s->proc.task.run_timeout = 15000;
+ s->proc.task.cancel_timeout = 10000;
+ }
s->param = p;
s->file = f;
strcpy(s->param, param);