Make shell handle ^C/^D gracefully