forked from mirror/openmw-tes3mp
Revert debce0fb80
, use a sleep() to work around the X11 bug
Problem with debce0fb80
is the crashed process won't be killed until the user accepts the message box, and it's harder to get to the message box when the window is in full screen or the cursor is locked.
This commit is contained in:
parent
debce0fb80
commit
93a76e2f56
1 changed files with 8 additions and 3 deletions
|
@ -382,7 +382,15 @@ static void crash_handler(const char *logfile)
|
|||
fflush(stdout);
|
||||
|
||||
if(crash_info.pid > 0)
|
||||
{
|
||||
gdb_info(crash_info.pid);
|
||||
kill(crash_info.pid, SIGKILL);
|
||||
}
|
||||
|
||||
// delay between killing of the crashed process and showing the message box to
|
||||
// work around occasional X server lock-up. this can only be a bug in X11 since
|
||||
// even faulty applications shouldn't be able to freeze the X server.
|
||||
usleep(100000);
|
||||
|
||||
if(logfile)
|
||||
{
|
||||
|
@ -390,9 +398,6 @@ static void crash_handler(const char *logfile)
|
|||
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL);
|
||||
}
|
||||
|
||||
if (crash_info.pid > 0)
|
||||
kill(crash_info.pid, SIGKILL);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue