Listen to the process 'exit' event.