Fix #362: prevent blocking main loop when starting run tasks

Drop complete() logic, waiting for run tasks to finish, from the
service_start() funciton to the general service_monitor().  This
refactor frees up the main loop and allows us to answer any API
calls from initctl even from the run task itself.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-09-10 13:16:09 +02:00
1 parent e6da0a22e7
commit 4701edef4c
3 files changed
+31 -30

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ assert_restarts()
assert_restart_cnt()
{
assert "Finit restart cnt $1" "$(texec initctl status "$2" | awk '/Restarts/{print $4;}')" = "($1)"
assert "Finit restart total $1 cnt $2" "$(texec initctl status "$3" | awk '/Restarts/{print $3 $4;}')" = "$1($2)"
}
assert_norestart()