mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
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:
1 parent
e6da0a22e7
commit
4701edef4c
3 files changed
+31
-30
No files matched your search
@@ -22,12 +22,6 @@ test_teardown()
|
||||
run "rm -f $FINIT_CONF"
|
||||
}
|
||||
|
||||
check_restarts()
|
||||
{
|
||||
assert "serv restarts" "$(texec cat "$1" | awk '{print $1;}')" -ge "$2"
|
||||
}
|
||||
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/setup.sh"
|
||||
|
||||
@@ -43,7 +37,7 @@ test_one()
|
||||
run "initctl reload"
|
||||
# run "initctl status fail.sh"
|
||||
|
||||
assert_restart_cnt "$num/10" fail.sh
|
||||
assert_restart_cnt "$num" "0/10" fail.sh
|
||||
}
|
||||
|
||||
sep
|
||||
|
||||
Reference in new issue
Block a user