diff --git a/bin/cdist-config b/bin/cdist-config index 363f95fb..5bbeed6e 100644 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -355,15 +355,17 @@ __cdist_tmp_removal() rm -rf "${__cdist_tmp_dir}" } -__cdist_exit_on_kill() +__cdist_kill_on_interrupt() { - # FIXME: before 1.8.0 -> kill all children, but do not segfault - # kill 0 __cdist_tmp_removal + kill 0 } +# Remove tempfiles at normal exit trap __cdist_tmp_removal EXIT -trap __cdist_exit_on_kill INT TERM + +# Kill children on interrupt +trap __cdist_kill_on_interrupt INT TERM ################################################################################ diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 96427f7a..b562d0f8 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -25,19 +25,6 @@ [ $# -ge 1 ] || __cdist_usage "[-p] [target host ]" set -u -# trap __cdist_tmp_removal EXIT -trap killandclean EXIT - -killandclean() -{ - __cdist_echo info "Existing and killing children..." - kill 0 - - # Ensure tmp stuff is being removed - __cdist_cleanly_exit -} - - filter() { awk -v host=$1 '{ print "[" host "] " $0 }'