[orca/gnome-3-20] Don't try to catch SIGSEGV; use faulthandler to dump output from crash
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-20] Don't try to catch SIGSEGV; use faulthandler to dump output from crash
- Date: Thu, 9 Jun 2016 11:39:09 +0000 (UTC)
commit dfede1743dc3b74800823c28e15e9dabd646ad6e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jun 1 14:20:43 2016 -0400
Don't try to catch SIGSEGV; use faulthandler to dump output from crash
Now when AT-SPI2 causes us to die from an illegal operation, we should
die properly.
src/orca/orca.py | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index aee13a1..3785f9e 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -29,6 +29,7 @@ __copyright__ = "Copyright (c) 2004-2009 Sun Microsystems Inc." \
"Copyright (c) 2012 Igalia, S.L."
__license__ = "LGPL"
+import faulthandler
import gi
import importlib
import os
@@ -763,12 +764,6 @@ def shutdownOnSignal(signum, frame):
if not cleanExit:
die(EXIT_CODE_HANG)
-def abortOnSignal(signum, frame):
- debug.println(debug.LEVEL_ALL,
- "Aborting due to signal = %d" \
- % signum)
- die(signum)
-
def main(cacheValues=True):
"""The main entry point for Orca. The exit codes for Orca will
loosely be based on signals, where the exit code will be the
@@ -776,6 +771,11 @@ def main(cacheValues=True):
an exit code of 0 means normal completion and an exit code of 50
means Orca exited because of a hang."""
+ if debug.debugFile and os.path.exists(debug.debugFile.name):
+ faulthandler.enable(file=debug.debugFile, all_threads=False)
+ else:
+ faulthandler.enable(all_threads=False)
+
# Method to call when we think something might be hung.
#
settings.timeoutCallback = timeout
@@ -786,7 +786,6 @@ def main(cacheValues=True):
signal.signal(signal.SIGINT, shutdownOnSignal)
signal.signal(signal.SIGTERM, shutdownOnSignal)
signal.signal(signal.SIGQUIT, shutdownOnSignal)
- signal.signal(signal.SIGSEGV, abortOnSignal)
if not _settingsManager.isAccessibilityEnabled():
_settingsManager.setAccessibility(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]