Catch keyboard interrupts while waiting for bash prompt