add check to see if process is running
because when we interrupt the tests via ^C, the signal also kills the background process
This commit is contained in:
@ -4,8 +4,8 @@
|
|||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
# Kill the testrpc instance that we started (if we started one).
|
# Kill the testrpc instance that we started (if we started one and if it's still running).
|
||||||
if [ -n "$testrpc_pid" ]; then
|
if [ -n "$testrpc_pid" ] && ps -p $testrpc_pid > /dev/null; then
|
||||||
kill -9 $testrpc_pid
|
kill -9 $testrpc_pid
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user