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 9d75fbf..ec82c6c 100644 --- a/functions +++ b/functions @@ -289,16 +289,12 @@ kill_everything() { # Terminate all processes stat_busy "Sending SIGTERM To Processes" run_hook "$1_prekillall" - 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