Fix #312: restart services with respawn set, e.g. ttys, immediately

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-11-09 20:27:16 +01:00
1 parent bb9bd7e0b0
commit f6b5b0260b
1 file changed
+8 -3
+8 -3
View File
@@ -2223,10 +2223,15 @@ restart:
* which we need to wait for the forked-off child to create its pid
* file. In both cases, after that, retry after 2 sec
*/
if (!svc->respawn)
if (!svc->respawn) {
dbg("delayed restart of %s", svc_ident(svc, NULL, 0));
service_timeout_after(svc, svc->restart_tmo, service_retry);
goto done;
service_timeout_after(svc, svc->restart_tmo, service_retry);
goto done;
}
dbg("respawning %s", svc_ident(svc, NULL, 0));
svc_unblock(svc);
break;
}
if (svc_is_runtask(svc)) { /* only run/task, not sysv here */