From 647a12169d5c7417c1a415db14862182ea3c955b Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz Date: Feb 29 2020 14:19:50 +0000 Subject: build.sh:buildp_ast(): iterate on rtl_kill_tree() until all child processes are gone. --- diff --git a/build.sh b/build.sh index 0a09c25..e4ad9b2 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() {