mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
sleep between logging assert and letting android kill the process
This commit is contained in:
parent
f9d3f9fd4e
commit
eab9068d89
1 changed files with 8 additions and 0 deletions
|
@ -36,6 +36,14 @@ and_assert( const char* test, int line, const char* file, const char* func )
|
|||
test, line, func, file );
|
||||
XP_LOGF( "assertion \"%s\" failed: line %d in %s() in %s",
|
||||
test, line, func, file );
|
||||
|
||||
/* give log a chance to write before __android_log_assert() kills the
|
||||
process */
|
||||
struct timespec req = {
|
||||
.tv_nsec = 400000000, /* 4/10 second */
|
||||
};
|
||||
nanosleep( &req, NULL );
|
||||
|
||||
__android_log_assert( test, "ASSERT", "line %d in %s() in %s",
|
||||
line, func, file );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue