From fcab617c0d8387c28eae3bdc20999abcb183e668 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 19 Jul 2016 13:26:16 +0200 Subject: [PATCH] Code cleanup --- dev/ofunctions.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 9e8202b..3b33ab1 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,4 +1,4 @@ -## FUNC_BUILD=2016071901 +## FUNC_BUILD=2016071902 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -734,6 +734,8 @@ function WaitForTaskCompletion { local seconds_begin=$SECONDS # Seconds since the beginning of the script local exec_time=0 # Seconds since the beginning of this function + local retval=0 # return value of monitored pid process + while eval "$PROCESS_TEST_CMD" > /dev/null do Spinner @@ -765,7 +767,7 @@ function WaitForTaskCompletion { sleep $SLEEP_TIME done wait $pid - local retval=$? + retval=$? Logger "${FUNCNAME[0]} ended for [$caller_name] with status $retval." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG return $retval } @@ -784,6 +786,8 @@ function WaitForCompletion { local seconds_begin=$SECONDS # Seconds since the beginning of the script local exec_time=0 # Seconds since the beginning of this function + local retval=0 # return value of monitored pid process + while eval "$PROCESS_TEST_CMD" > /dev/null do Spinner