prompt() has to be global since a signal handler calls it