diff options
Diffstat (limited to 'subr')
-rw-r--r-- | subr/ex_pkg_dispatch.subr | 5 | ||||
-rw-r--r-- | subr/ex_pkg_exec.subr | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/subr/ex_pkg_dispatch.subr b/subr/ex_pkg_dispatch.subr index fea64c8b..21fa6733 100644 --- a/subr/ex_pkg_dispatch.subr +++ b/subr/ex_pkg_dispatch.subr @@ -21,11 +21,6 @@ exp_pkg_dispatch() { "${_dispatch_fn}" start_pkg "${_pkg_name}" "${_tgt_name}"; (set -o errexit -o noglob; BUILD_IS_PARENT=0; ex_pkg_env "${_pkg_name}" "${_tgt_name}" "${_restart_at}"; - trap "if [ \${?} -eq 0 ]; then \ - echo \"done ${_pkg_name} ${_tgt_name}\" >&3; \ - else \ - echo \"fail ${_pkg_name} ${_tgt_name}\" >&3; \ - fi;" EXIT HUP INT TERM USR1 USR2; ex_pkg_exec "${_pkg_name}" "${_tgt_name}" "${_restart_at}" \ "${_dispatch_fn}";) 1>"${_stderrout_path}" 2>&1 3>"${_pipe_path}" & : $((${_njobs_vname}+=1)); diff --git a/subr/ex_pkg_exec.subr b/subr/ex_pkg_exec.subr index ceb9579a..76294763 100644 --- a/subr/ex_pkg_exec.subr +++ b/subr/ex_pkg_exec.subr @@ -24,6 +24,12 @@ exp_pkg_exec_pre() { ex_pkg_exec() { local _pkg_name="${1}" _tgt_name="${2}" _restart_at="${3}" \ _step _step_cmd _step_cmd_pfx _step_rc; + trap "if [ \${?} -eq 0 ]; then \ + echo \"done ${_pkg_name} ${_tgt_name}\" >&3; \ + else \ + echo \"fail ${_pkg_name} ${_tgt_name}\" >&3; \ + pkill -U "${$}"; \ + fi;" EXIT HUP INT TERM USR1 USR2; exp_pkg_exec_pre "${_pkg_name}" "${_tgt_name}" "${_restart_at}"; "${_dispatch_fn}" exec_start "${_pkg_name}" "${_tgt_name}"; if ex_rtl_test_cmd "pkg_${_pkg_name}_all"; then |