27 Jun
2011
27 Jun
'11
5:11 p.m.
All credits go to: Dave Reisner <d@falconindy.com> --- functions | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/functions b/functions index d3da4e1..88a7822 100644 --- a/functions +++ b/functions @@ -286,16 +286,12 @@ kill_everything() { run_hook "$1_prekillall" stat_busy "Sending SIGTERM To Processes" - local pid k5args="" - for pid in ${omit_pids[@]}; do - k5args+=" -o $pid" - done - /sbin/killall5 -15 $k5args &>/dev/null + /sbin/killall5 -15 ${omit_pids[@]/#/-o } &>/dev/null /bin/sleep 5 stat_done stat_busy "Sending SIGKILL To Processes" - /sbin/killall5 -9 $k5args &>/dev/null + /sbin/killall5 -9 ${omit_pids[@]/#/-o } &>/dev/null /bin/sleep 1 stat_done -- 1.7.1