diff options
author | Bernard Ogden <bernie.ogden@linaro.org> | 2014-12-11 13:45:02 +0000 |
---|---|---|
committer | Bernard Ogden <bernie.ogden@linaro.org> | 2014-12-15 11:47:22 +0000 |
commit | babd5e8c6c413f0346ab693a6832ccf03650b4bb (patch) | |
tree | 1cec1fe18ebb4f0a901bcc67579723efdda5cf4f | |
parent | ac56dbcf89d53d395725cb6025af7aeae1b3881e (diff) |
Stop producing output we never need
Required inventing a new way of stalling until signal
-rwxr-xr-x | scripts/lava.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/lava.sh b/scripts/lava.sh index 91841f7..9b3980c 100755 --- a/scripts/lava.sh +++ b/scripts/lava.sh @@ -6,11 +6,16 @@ set -o pipefail if test $? -ne 0; then echo "Unable to source `dirname $0`/listener.sh" fi +waiter= error=1 trap 'exit ${error}' TERM INT HUP QUIT release() { + if test x"${waiter}" != x; then + kill "${waiter}" + wait "${waiter}" + fi if test -d "${temps}"; then rm -rf "${temps}" if test $? -ne 0; then @@ -230,8 +235,8 @@ if test x"${user_ip}" = x; then fi echo "LAVA target ready at ${user_ip}" -#Continue to report whatever comes across the listener -while true; do - read line <&4 - echo "${line}" -done + +#Wait to be killed, at which point we cancel the job +sleep infinity & +waiter=$! +wait ${waiter} |