use kill 0 to kill all children

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-05-10 16:58:59 +02:00
parent 32e7ac3e78
commit b1f10f2936

View file

@ -30,12 +30,7 @@ trap killandclean EXIT
killandclean() killandclean()
{ {
# i may have been altered outside, just use the current offset kill 0
while [ "$i" -gt 0 ]; do
eval pid=\$pid_$i
kill "$pid"
i=$((i-1))
done
# Ensure tmp stuff is being removed # Ensure tmp stuff is being removed
__cdist_tmp_removal __cdist_tmp_removal