fix(util/debug): avoid infinite loop when Ctrl-D is pressed after an assertion violation

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-12 17:20:35 -08:00
parent 5d9a95addd
commit 915644f3b3

View file

@ -60,6 +60,8 @@ void invoke_debugger() {
g_has_violations = true;
int * x = 0;
for (;;) {
if (std::cin.eof())
exit(1);
#ifdef _WINDOWS
std::cerr << "(C)ontinue, (A)bort, (S)top\n";
#else
@ -73,6 +75,7 @@ void invoke_debugger() {
return;
case 'A':
case 'a':
case EOF:
exit(1);
case 'S':
case 's':