From 18f318d138cfaaf579b10716ef0c1e10179e0245 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 16 Aug 2016 22:54:36 +0200 Subject: [PATCH] Last fix for killchilds --- dev/ofunctions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 64e180e..16884f7 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -202,6 +202,7 @@ function KillChilds { function KillAllChilds { local pids="${1}" # List of parent pids to kill separated by semi-colon + local self="${2:-false}" # Should parent be killed too ? __CheckArguments 1 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG @@ -209,7 +210,7 @@ function KillAllChilds { IFS=';' read -a pidsArray <<< "$pids" for pid in "${pidsArray[@]}"; do - KillChilds $pid + KillChilds $pid $self if [ $? != 0 ]; then errorcount=$((errorcount+1)) fi