ruby: Check stderr and not stdin before hanging on an assert.
This commit is contained in:
parent
7769cc9092
commit
ebf2f5aadd
2 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ const bool ASSERT_FLAG = true;
|
||||||
<< __PRETTY_FUNCTION__ << " in "\
|
<< __PRETTY_FUNCTION__ << " in "\
|
||||||
<< __FILE__ << ":"\
|
<< __FILE__ << ":"\
|
||||||
<< __LINE__ << endl << flush;\
|
<< __LINE__ << endl << flush;\
|
||||||
if(isatty(STDIN_FILENO)) {\
|
if(isatty(STDERR_FILENO)) {\
|
||||||
cerr << "At this point you might want to attach a debug to ";\
|
cerr << "At this point you might want to attach a debug to ";\
|
||||||
cerr << "the running and get to the" << endl;\
|
cerr << "the running and get to the" << endl;\
|
||||||
cerr << "crash site; otherwise press enter to continue" << endl;\
|
cerr << "crash site; otherwise press enter to continue" << endl;\
|
||||||
|
@ -175,7 +175,7 @@ const bool ASSERT_FLAG = true;
|
||||||
<< __PRETTY_FUNCTION__ << " in "\
|
<< __PRETTY_FUNCTION__ << " in "\
|
||||||
<< __FILE__ << ":"\
|
<< __FILE__ << ":"\
|
||||||
<< __LINE__ << endl << flush;\
|
<< __LINE__ << endl << flush;\
|
||||||
if(isatty(STDIN_FILENO)) {\
|
if(isatty(STDERR_FILENO)) {\
|
||||||
cerr << "press enter to continue" << endl;\
|
cerr << "press enter to continue" << endl;\
|
||||||
cerr << "PID: " << getpid();\
|
cerr << "PID: " << getpid();\
|
||||||
cerr << endl << flush; \
|
cerr << endl << flush; \
|
||||||
|
|
|
@ -67,7 +67,7 @@ const bool CHECK_INVALID_RESOURCE_STALLS = false;
|
||||||
<< __PRETTY_FUNCTION__ << " in "\
|
<< __PRETTY_FUNCTION__ << " in "\
|
||||||
<< __FILE__ << ":"\
|
<< __FILE__ << ":"\
|
||||||
<< __LINE__ << endl;\
|
<< __LINE__ << endl;\
|
||||||
if(isatty(STDIN_FILENO)) {\
|
if(isatty(STDERR_FILENO)) {\
|
||||||
cerr << "At this point you might want to attach a debug to ";\
|
cerr << "At this point you might want to attach a debug to ";\
|
||||||
cerr << "the running and get to the" << endl;\
|
cerr << "the running and get to the" << endl;\
|
||||||
cerr << "crash site; otherwise press enter to continue" << endl;\
|
cerr << "crash site; otherwise press enter to continue" << endl;\
|
||||||
|
|
Loading…
Reference in a new issue