Try not to swallow stacktraces when terminating a process.

looper
Ben Niemann 2016-10-02 15:13:11 +02:00
parent 5029e1d069
commit 4261864f97
3 changed files with 6 additions and 0 deletions

View File

@ -200,7 +200,9 @@ class Pipeline(object):
ctxt.duration = self._frame_size
except: # pylint: disable=bare-except
sys.stdout.flush()
sys.excepthook(*sys.exc_info())
sys.stderr.flush()
os._exit(1)
finally:

View File

@ -370,6 +370,8 @@ class ProcessImpl(object):
def error_handler(self, event_loop, context):
event_loop.default_exception_handler(context)
sys.stdout.flush()
sys.stderr.flush()
os._exit(1)
def main(self, ready_callback, *args, **kwargs):

View File

@ -379,5 +379,7 @@ class EditorApp(BaseEditorApp):
logger.error(
"Failed to show crash dialog: %s", traceback.format_exc())
sys.stdout.flush()
sys.stderr.flush()
os._exit(EXIT_EXCEPTION)