Fix restart services with respawn set, e.g. ttys, immediately
@@ -2223,12 +2223,17 @@ 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;
}
+ dbg("respawning %s", svc_ident(svc, NULL, 0));
+ svc_unblock(svc);
+ break;
+ }
+
if (svc_is_runtask(svc)) { /* only run/task, not sysv here */
svc_set_state(svc, SVC_STOPPING_STATE);
svc->once++;
