mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 16:20:24 +01:00
os: Handle SIGABRT
Without this, assertion failures can make life hard for users and those
trying to help them.
v2:
* Change commit log wording slightly to "can make life hard", since
apparently e.g. logind can alleviate that somewhat.
* Set default handler for SIGABRT in
hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and
hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 27a6b9f7c8)
This commit is contained in:
parent
e59a32c897
commit
b3de3ebcf4
4 changed files with 9 additions and 0 deletions
|
|
@ -309,6 +309,7 @@ InstallSignalHandlers(void)
|
|||
}
|
||||
else {
|
||||
OsSignal(SIGSEGV, SIG_DFL);
|
||||
OsSignal(SIGABRT, SIG_DFL);
|
||||
OsSignal(SIGILL, SIG_DFL);
|
||||
#ifdef SIGEMT
|
||||
OsSignal(SIGEMT, SIG_DFL);
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ QuartzInitOutput(int argc,
|
|||
{
|
||||
/* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGABRT, SIG_DFL);
|
||||
signal(SIGILL, SIG_DFL);
|
||||
#ifdef SIGEMT
|
||||
signal(SIGEMT, SIG_DFL);
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ OsInit(void)
|
|||
int i;
|
||||
|
||||
int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS,
|
||||
SIGABRT,
|
||||
SIGSYS,
|
||||
SIGXCPU,
|
||||
SIGXFSZ,
|
||||
|
|
|
|||
|
|
@ -1351,6 +1351,12 @@ OsAbort(void)
|
|||
{
|
||||
#ifndef __APPLE__
|
||||
OsBlockSignals();
|
||||
#endif
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
/* abort() raises SIGABRT, so we have to stop handling that to prevent
|
||||
* recursion
|
||||
*/
|
||||
OsSignal(SIGABRT, SIG_DFL);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue