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
1 changed files with 1 additions and 6 deletions

View File

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