X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Fresources%2Fscripts%2Foperation_signal.sh;fp=example%2Fdiameter%2Flauncher%2Fresources%2Fscripts%2Foperation_signal.sh;h=1be6fa97ba6b7a7681b95560d06dc7295a285d93;hb=18319deabbc8563fc112795968372e96263e6fe4;hp=85b31112b4a0e44518b0aaa0a63261bcac8700eb;hpb=fca0f585780127dba2564de6741d2de9a5e59fb4;p=anna.git diff --git a/example/diameter/launcher/resources/scripts/operation_signal.sh b/example/diameter/launcher/resources/scripts/operation_signal.sh index 85b3111..1be6fa9 100755 --- a/example/diameter/launcher/resources/scripts/operation_signal.sh +++ b/example/diameter/launcher/resources/scripts/operation_signal.sh @@ -29,7 +29,10 @@ else grep -v "^#" $FILE | sed '/^[ \t]*$/d' > sigusr2.in fi 0> sigusr2.out +kill -0 $PID 2>/dev/null +[ $? -ne 0 ] && _exit "Operation error: missing process with pid $PID" kill -s SIGUSR2 $PID + # Detect EOF and print all except that last line: while [ -z "$(tail -1 sigusr2.out | grep ^EOF)" ]; do sleep 0.1; done head --lines=-1 `pwd`/sigusr2.out