Skip to content

Commit

Permalink
Better exit handler
Browse files Browse the repository at this point in the history
  • Loading branch information
viklund committed Apr 5, 2018
1 parent a02753f commit 0ea9885
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ BACKEND_PID=$!
sleep 2 # Lets wait a little bit so the server has started

function exit_handler() {
rv=$?
# Ignore errors in the exit handler
set +e
kill -9 $BACKEND_PID

echo "THE HTTP LOG WAS:"
cat http_log.txt
exit $rv
}

trap exit_handler EXIT
Expand Down

0 comments on commit 0ea9885

Please sign in to comment.