Skip to content

Commit

Permalink
tests: make sure on_exit handler completes
Browse files Browse the repository at this point in the history
Let's not interrupt it in ther middle in the case it fails to send
a signal to the process.
  • Loading branch information
sergio-correia committed May 5, 2023
1 parent 5160a4a commit 0cacc91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/helpers
Original file line number Diff line number Diff line change
@@ -67,7 +67,10 @@ start_standalone_server() {
}

on_exit() {
if [ "$PID" ]; then kill "${PID}"; wait "${PID}" || true; fi
if [ "${PID}" ]; then
kill "${PID}" || true
wait "${PID}" || true
fi
[ -d "${TMP}" ] && rm -rf "${TMP}"
}

0 comments on commit 0cacc91

Please sign in to comment.