ruby: Check stderr and not stdin before hanging on an assert.

This commit is contained in:
Steve Reinhardt 2009-05-11 10:38:46 -07:00
parent 7769cc9092
commit ebf2f5aadd
2 changed files with 3 additions and 3 deletions

View file

@ -154,7 +154,7 @@ const bool ASSERT_FLAG = true;
<< __PRETTY_FUNCTION__ << " in "\
<< __FILE__ << ":"\
<< __LINE__ << endl << flush;\
if(isatty(STDIN_FILENO)) {\
if(isatty(STDERR_FILENO)) {\
cerr << "At this point you might want to attach a debug to ";\
cerr << "the running and get to the" << endl;\
cerr << "crash site; otherwise press enter to continue" << endl;\
@ -175,7 +175,7 @@ const bool ASSERT_FLAG = true;
<< __PRETTY_FUNCTION__ << " in "\
<< __FILE__ << ":"\
<< __LINE__ << endl << flush;\
if(isatty(STDIN_FILENO)) {\
if(isatty(STDERR_FILENO)) {\
cerr << "press enter to continue" << endl;\
cerr << "PID: " << getpid();\
cerr << endl << flush; \

View file

@ -67,7 +67,7 @@ const bool CHECK_INVALID_RESOURCE_STALLS = false;
<< __PRETTY_FUNCTION__ << " in "\
<< __FILE__ << ":"\
<< __LINE__ << endl;\
if(isatty(STDIN_FILENO)) {\
if(isatty(STDERR_FILENO)) {\
cerr << "At this point you might want to attach a debug to ";\
cerr << "the running and get to the" << endl;\
cerr << "crash site; otherwise press enter to continue" << endl;\