Wait when restarting ocid during tests

When we restart ocid as part of a test, wait for the daemon to exit when
we send it a SIGTERM, just as we do when we try to stop it for good.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2017-02-03 17:18:26 -05:00
parent d0464b11e2
commit 5a89d5381d

View file

@ -197,6 +197,7 @@ function stop_ocid() {
function restart_ocid() {
if [ "$OCID_PID" != "" ]; then
kill "$OCID_PID" >/dev/null 2>&1
wait "$OCID_PID"
start_ocid
else
echo "you must start ocid first"