use kill 0 to kill all children

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/archive_shell_function_approach
Nico Schottelius 14 years ago
parent 32e7ac3e78
commit b1f10f2936
  1. 7
      bin/cdist-mass-deploy

@ -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

Loading…
Cancel
Save