Do a hard exit on crash
This commit is contained in:
parent
68b134b4a9
commit
45621b0645
@ -398,8 +398,6 @@ class QuteBrowser(QApplication):
|
|||||||
exc = (exctype, excvalue, tb)
|
exc = (exctype, excvalue, tb)
|
||||||
sys.__excepthook__(*exc)
|
sys.__excepthook__(*exc)
|
||||||
|
|
||||||
self._quit_status['crash'] = False
|
|
||||||
|
|
||||||
if exctype is BdbQuit or not issubclass(exctype, Exception):
|
if exctype is BdbQuit or not issubclass(exctype, Exception):
|
||||||
# pdb exit, KeyboardInterrupt, ...
|
# pdb exit, KeyboardInterrupt, ...
|
||||||
try:
|
try:
|
||||||
@ -407,6 +405,9 @@ class QuteBrowser(QApplication):
|
|||||||
return
|
return
|
||||||
except Exception:
|
except Exception:
|
||||||
self.quit()
|
self.quit()
|
||||||
|
|
||||||
|
self._quit_status['crash'] = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pages = self._recover_pages()
|
pages = self._recover_pages()
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -441,7 +442,9 @@ class QuteBrowser(QApplication):
|
|||||||
logging.debug("Running {} with args {}".format(sys.executable,
|
logging.debug("Running {} with args {}".format(sys.executable,
|
||||||
argv))
|
argv))
|
||||||
subprocess.Popen(argv)
|
subprocess.Popen(argv)
|
||||||
self._maybe_quit('crash')
|
# We might risk a segfault here, but that's better than continuing to
|
||||||
|
# run in some undefined state.
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def _maybe_quit(self, sender):
|
def _maybe_quit(self, sender):
|
||||||
"""Maybe quit qutebrowser.
|
"""Maybe quit qutebrowser.
|
||||||
|
Loading…
Reference in New Issue
Block a user