diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-02-29 14:27:27 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-02-29 14:27:27 +0000 |
commit | a9717545551aa7d6e3e05e629b8142a1cd669a77 (patch) | |
tree | eab5704e2aaf486014ba399f4c68ea2b8081177b | |
parent | 17bbee5b5e159b3d474c02e7ca462c757cbbcd71 (diff) | |
download | midipix_build-a9717545551aa7d6e3e05e629b8142a1cd669a77.tar.bz2 midipix_build-a9717545551aa7d6e3e05e629b8142a1cd669a77.tar.xz |
build.sh:buildp_ast(): break from rtl_kill_tree() loop after 8 attempts.
build.sh:buildp_ast(): list killed PIDs on single line.
-rwxr-xr-x | build.sh | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -3,22 +3,25 @@ # buildp_ast() { - local _param="${1}" RTL_KILL_TREE_PIDS=""; + local _param="${1}" _pids="" _pids_niter=0 RTL_KILL_TREE_PIDS=""; if [ "${_param}" = "abort" ]; then rtl_log_msg failexit "Build aborted."; fi; if [ -n "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}" ]; then rtl_fileop rm "${DEFAULT_BUILD_STATUS_IN_PROGRESS_FNAME}"; 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 + while [ "${_pids_niter}" -lt 8 ]; do + _pids="$(rtl_lconcat "${_pids}" "${RTL_KILL_TREE_PIDS}")"; RTL_KILL_TREE_PIDS=""; + if ! rtl_kill_tree "${$}" "TERM"\ + || [ -z "${RTL_KILL_TREE_PIDS}" ]; then break; + else + : $((_pids_niter+=1)); fi; done; + if [ -n "${_pids}" ]; then + rtl_log_msg vnfo "Killed PIDs ${_pids}"; + fi; }; buildp_dispatch_fail_pkg() { |