ForkProcess: flush stderr for traceback
authorZac Medico <zmedico@gentoo.org>
Sun, 7 Jul 2013 02:16:56 +0000 (19:16 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 7 Jul 2013 02:16:56 +0000 (19:16 -0700)
pym/portage/util/_async/ForkProcess.py

index be856d039f719d642758f17d94adc999e4bd9f24..25f72d308e4f75fdabccda0787f5ff93ef907e9f 100644 (file)
@@ -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)