Do not let test hang if the child process died or failed to start

This is to avoid the cases where Werkzeug failed to start for some reason and it makes the test hang.