From 989546be58842a9fb611fbd9ddfdb2d11cf466d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=ADa=20Andrea=20Illanes=20Albornoz?= Date: Wed, 22 Feb 2023 04:54:39 +0100 Subject: Exit correctly on ^C and -V [..]. --- build.sh | 3 ++- subr.rtl/rtl_log.subr | 4 +++- 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"; -- cgit v1.2.3