From 98201cf61526ee61f8a59b79704115426d384564 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 17 Dec 2018 22:43:34 +0100 Subject: [PATCH] Fixed possible deadlock in ExecTasks --- dev/ofunctions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index b047494..80ce8ea 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -31,7 +31,7 @@ #### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MICRO SUBSET #### _OFUNCTIONS_VERSION=2.3.0-RC2 -_OFUNCTIONS_BUILD=2018121702 +_OFUNCTIONS_BUILD=2018121703 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -1105,7 +1105,9 @@ function ExecTasks { if [ "$functionMode" == "ParallelExec" ]; then Logger "Command was [${commandsArrayPid[$pid]}]." "ERROR" fi - Logger "Command output was [$(cat ${commandsArrayOutput[$pid]})]." "ERROR" + if [ -f "${commandsArrayOutput[$pid]}" ]; then + Logger "Command output was [$(cat ${commandsArrayOutput[$pid]})]." "ERROR" + fi fi errorcount=$((errorcount+1)) # Welcome to variable variable bash hell