[orca] Revert "Add customization to check for AT-SPI2 registry crash and shutdown if detected"



commit 6c2b464a6e84c093b68aa446ffc120fa70c0cc1b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jun 1 13:46:47 2016 -0400

    Revert "Add customization to check for AT-SPI2 registry crash and shutdown if detected"
    
    The hack is no longer needed. We were trying to catch the SIGSEGV.
    We shouldn't do that. If we don't try to catch it, when the registry
    crashes or an invalid operation occurs in AT-SPI2, Orca will crash
    properly. Of course, crashing is bad. But Orca has very little control
    over AT-SPI2 bugs. And crashing, along with providing useful information,
    beats hanging and providing no clues.
    
    This reverts commit 2dba547bcae49f25649c185498d402776a464ea5.

 src/orca/orca.py       |   32 --------------------------------
 src/orca/orca_state.py |    2 --
 src/orca/settings.py   |    3 ---
 3 files changed, 0 insertions(+), 37 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index eb4ce86..7e3c76c 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -38,8 +38,6 @@ import signal
 import subprocess
 import sys
 
-from gi.repository import GLib
-
 try:
     from gi.repository.Gio import Settings
     a11yAppSettings = Settings(schema_id='org.gnome.desktop.a11y.applications')
@@ -688,30 +686,6 @@ def abortOnSignal(signum, frame):
                   % signum)
     die(signum)
 
-def _getRegistryPIDs(uid):
-    try:
-        output = subprocess.check_output('pgrep -f at-spi2-registryd -u %s' % uid, shell=True)
-        pids = [int(p) for p in output.split()]
-    except:
-        msg = 'ERROR: Could not obtain registry PID'
-        debug.println(debug.LEVEL_INFO, msg, True)
-        return []
-
-    msg = 'ORCA: Registry PIDs FOR user id %s: %s' % (uid, pids)
-    debug.println(debug.LEVEL_INFO, msg, True)
-    return pids
-
-def _checkRegistry():
-    pids = _getRegistryPIDs(os.getuid())
-    if pids and orca_state.registryPID in pids:
-        return True
-
-    msg = 'FATAL: Registry PID %s is not in Registry PIDs for user %s' % (orca_state.registryPID, pids)
-    debug.println(debug.LEVEL_INFO, msg, True)
-    shutdown()
-
-    return False
-
 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
@@ -735,12 +709,6 @@ def main(cacheValues=True):
         _settingsManager.setAccessibility(True)
 
     init(pyatspi.Registry)
-    registryPIDs = _getRegistryPIDs(os.getuid())
-    if registryPIDs:
-        orca_state.registryPID = registryPIDs[-1]
-
-    if settings.checkForRegistryCrash:
-        GLib.timeout_add(100, _checkRegistry)
 
     try:
         message = messages.START_ORCA
diff --git a/src/orca/orca_state.py b/src/orca/orca_state.py
index 8cff0fb..bb8bd49 100644
--- a/src/orca/orca_state.py
+++ b/src/orca/orca_state.py
@@ -76,5 +76,3 @@ learnModeEnabled = False
 orcaOS = None
 
 listNotificationsModeEnabled = False
-
-registryPID = None
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 8d054ee..2b1ffc3 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -376,6 +376,3 @@ layoutMode = True
 
 rewindAndFastForwardInSayAll = False
 structNavInSayAll = False
-
-# NOTE: This is temporary and could change or vanish at any time.
-checkForRegistryCrash = False


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]