From 1aae13adbc8648d3763e1570ddeffb2536c5d826 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Jul 2013 19:16:56 -0700 Subject: [PATCH] ForkProcess: flush stderr for traceback --- pym/portage/util/_async/ForkProcess.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/util/_async/ForkProcess.py b/pym/portage/util/_async/ForkProcess.py index be856d039..25f72d308 100644 --- a/pym/portage/util/_async/ForkProcess.py +++ b/pym/portage/util/_async/ForkProcess.py @@ -1,7 +1,8 @@ -# Copyright 2012 Gentoo Foundation +# Copyright 2012-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import signal +import sys import traceback import portage @@ -46,6 +47,8 @@ class ForkProcess(SpawnProcess): raise except: traceback.print_exc() + # os._exit() skips stderr flush! + sys.stderr.flush() finally: os._exit(rval) -- 2.26.2