emit an exit event on exit

remove error prone prompt waiting