summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-22 04:54:39 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-02-22 04:54:39 +0100
commit989546be58842a9fb611fbd9ddfdb2d11cf466d3 (patch)
tree8fcc1918fe91281def4b079a303a2d36986e3561
parenta2d9a26f4cd7b4076c6be4a370f3c382a785e0c6 (diff)
downloadmidipix_build-989546be58842a9fb611fbd9ddfdb2d11cf466d3.tar.bz2
midipix_build-989546be58842a9fb611fbd9ddfdb2d11cf466d3.tar.xz
Exit correctly on ^C and -V [..].
-rwxr-xr-xbuild.sh3
-rw-r--r--subr.rtl/rtl_log.subr4
2 files changed, 5 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 3934c971..09a2207c 100755
--- a/build.sh
+++ b/build.sh
@@ -4,7 +4,6 @@
# {{{ buildp_ast($_param)
buildp_ast() {
- trap '' HUP INT TERM USR1 USR2;
local _bpa_param="${1}" \
_bpa_cmd="" _bpa_pids="" _bpa_pids_new="" \
_bpa_pids_niter=0 _bpa_pkg_name="";
@@ -18,6 +17,8 @@ buildp_ast() {
fi;
done;
+ trap '' HUP INT TERM USR1 USR2;
+
if [ "${_bpa_param}" = "abort" ]; then
rtl_log_msg "fatalexit" "${MSG_build_aborted}";
fi;
diff --git a/subr.rtl/rtl_log.subr b/subr.rtl/rtl_log.subr
index 89cfe4cb..57e2ebfd 100644
--- a/subr.rtl/rtl_log.subr
+++ b/subr.rtl/rtl_log.subr
@@ -82,7 +82,9 @@ rtl_log_msg() {
_rlm3_tag="fatal"; _rlm3_exitfl=1;
fi;
- if rtl_lmatch \$RTLP_LOG_TAGS "${_rlm3_tag}" ","; then
+ if [ "${_rlm3_tag}" = "fatal" ]\
+ || rtl_lmatch \$RTLP_LOG_TAGS "${_rlm3_tag}" ",";
+ then
eval _rlm3_attr='${LOG_TAG_'"${_rlm3_tag}"':-}';
if [ "${#_rlm3_attr}" -eq 0 ]; then
rtlp_log_printf "" "" "0;==> FIXME TODO XXX UNKNOWN TAG \`${_rlm3_tag}' PASSED TO rtl_log_msg()\n";