From 30ae149529f8ce02bee49c0706d67e677e44f24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Fri, 22 Dec 2017 18:40:49 +0000 Subject: build.sh:fail_pkg: terminate pending builds given build failure, -P, and absence of -R. etc/build.usage: clarify the consequences of parallelising builds to guide the perplexed and to confuse the people of the tribe of certainty into enlightenment (or not?) subr/ex_pkg_dispatch.subr:exp_pkg_dispatch(): moved traps. subr/ex_pkg_exec.subr:ex_pkg_exec(): forcibly pkill(1) child processes on failure. --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 479cdce3..8e1ac804 100755 --- a/build.sh +++ b/build.sh @@ -45,7 +45,10 @@ buildp_dispatch() { else ex_rtl_log_msg fail "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log:"; cat "${BUILD_WORKDIR}/${_pkg_name}_stderrout.log"; - ex_rtl_log_msg failexit "Build failed in \`${_pkg_name}'."; + ex_rtl_log_msg fail "Build failed in \`${_pkg_name}'."; + ex_rtl_log_msg fail "Terminating pending builds..."; + pkill -P "${$}"; + exit 1; fi; ;; disabled_pkg) ex_rtl_log_msg vnfo "Skipping disabled package \`${_pkg_name}.'"; ;; skipped_pkg) ex_rtl_log_msg vnfo "Skipping finished package \`${_pkg_name}.'"; ;; -- cgit v1.2.3