mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
Fix #312: restart services with respawn set, e.g. ttys, immediately
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
bb9bd7e0b0
commit
f6b5b0260b
1 file changed
+8
-3
+8
-3
@@ -2223,10 +2223,15 @@ restart:
|
|||||||
* which we need to wait for the forked-off child to create its pid
|
* which we need to wait for the forked-off child to create its pid
|
||||||
* file. In both cases, after that, retry after 2 sec
|
* 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));
|
dbg("delayed restart of %s", svc_ident(svc, NULL, 0));
|
||||||
service_timeout_after(svc, svc->restart_tmo, service_retry);
|
service_timeout_after(svc, svc->restart_tmo, service_retry);
|
||||||
goto done;
|
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 */
|
if (svc_is_runtask(svc)) { /* only run/task, not sysv here */
|
||||||
|
|||||||
Reference in new issue
Block a user