Use the tap 'end' event to exit the process (fixes the tests in 0.8).