[PATCH] Fix a hang in read-from-minibuffer if the X display disappears