os: Make OsSignalHandler ask for core dumps for signo != SIGQUIT
SIGQUIT is a normal termination request, but any other signal we handle here wants a core. This has the effect of making FatalError's call to AbortServer trigger the if (CoreDump) OsAbort(); path. This will allow us to remove some DDX code that has the same net effect. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
0a255dceb7
commit
9c72887939
|
@ -52,6 +52,7 @@ SOFTWARE.
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "osdep.h"
|
#include "osdep.h"
|
||||||
|
#include "opaque.h"
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -74,8 +75,6 @@ SOFTWARE.
|
||||||
#define ADMPATH "/usr/adm/X%smsgs"
|
#define ADMPATH "/usr/adm/X%smsgs"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern char *display;
|
|
||||||
|
|
||||||
#ifdef RLIMIT_DATA
|
#ifdef RLIMIT_DATA
|
||||||
int limitDataSpace = -1;
|
int limitDataSpace = -1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -151,6 +150,9 @@ OsSigHandler(int signo)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (signo != SIGQUIT)
|
||||||
|
CoreDump = TRUE;
|
||||||
|
|
||||||
FatalError("Caught signal %d (%s). Server aborting\n",
|
FatalError("Caught signal %d (%s). Server aborting\n",
|
||||||
signo, strsignal(signo));
|
signo, strsignal(signo));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue