summaryrefslogtreecommitdiffhomepage
path: root/build.sh
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-29 14:27:27 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-29 14:27:27 +0000
commita9717545551aa7d6e3e05e629b8142a1cd669a77 (patch)
treeeab5704e2aaf486014ba399f4c68ea2b8081177b /build.sh
parent17bbee5b5e159b3d474c02e7ca462c757cbbcd71 (diff)
downloadmidipix_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.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index e4ad9b27..5c4f6146 100755
--- a/build.sh
+++ b/build.sh
@@ -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() {