From 352c439a96aec70d7ecdff59b00c8e4f099f8bc3 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Mon, 11 Jan 2016 11:40:19 -0800 Subject: [PATCH] Guard both kill and wait with APISERVER_PID. --- hack/test-update-storage-objects.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hack/test-update-storage-objects.sh b/hack/test-update-storage-objects.sh index 24d25d8622b..107336b6080 100755 --- a/hack/test-update-storage-objects.sh +++ b/hack/test-update-storage-objects.sh @@ -62,10 +62,11 @@ function startApiServer() { function killApiServer() { kube::log::status "Killing api server" - [[ -n ${APISERVER_PID-} ]] && kill ${APISERVER_PID} 1>&2 2>/dev/null - - wait ${APISERVER_PID} || true - kube::log::status "api server exited" + if [[ -n ${APISERVER_PID-} ]]; then + kill ${APISERVER_PID} 1>&2 2>/dev/null + wait ${APISERVER_PID} || true + kube::log::status "api server exited" + fi unset APISERVER_PID }