From 647a12169d5c7417c1a415db14862182ea3c955b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sat, 29 Feb 2020 14:19:50 +0000 Subject: build.sh:buildp_ast(): iterate on rtl_kill_tree() until all child processes are gone. --- build.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 0a09c250..e4ad9b27 100755 --- a/build.sh +++ b/build.sh @@ -10,10 +10,15 @@ buildp_ast() { if [ -n "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then rtl_fileop rm "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}"; fi; - if rtl_kill_tree "${$}" "TERM"\ - && [ -n "${RTL_KILL_TREE_PIDS}" ]; then - rtl_log_msg vnfo "Killed PIDs ${RTL_KILL_TREE_PIDS}"; - fi; + while true; do + RTL_KILL_TREE_PIDS=""; + if rtl_kill_tree "${$}" "TERM"\ + && [ -n "${RTL_KILL_TREE_PIDS}" ]; then + rtl_log_msg vnfo "Killed PIDs ${RTL_KILL_TREE_PIDS}"; + else + break; + fi; + done; }; buildp_dispatch_fail_pkg() { -- cgit v1.2.3