From: Travis Cross Date: Sat, 2 Jun 2012 04:33:16 +0000 (+0000) Subject: debian: kill children if we exit unexpectedly X-Git-Tag: v1.2.0~290^2~9^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73b34cb373f94ec083bda2a5d4a96f486f3dfebe;p=thirdparty%2Ffreeswitch.git debian: kill children if we exit unexpectedly --- diff --git a/debian/util.sh b/debian/util.sh index 850558b1f4..2f7362a26c 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -305,6 +305,7 @@ build_all () { mkdir -p ../log > ../log/changes echo; echo; echo; echo + trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT if [ "${orig:0:2}" = ".." ]; then for distro in $distros; do echo "Creating $distro dsc..." >&2 @@ -328,6 +329,7 @@ build_all () { done ! $par || wait fi + trap - EXIT cat ../log/changes }