This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Make build-many-glibcs.py flush stdout before execv [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Fri, 16 Dec 2016 16:17:54 +0000
- Subject: Make build-many-glibcs.py flush stdout before execv [committed]
- Authentication-results: sourceware.org; auth=none
When build-many-glibcs.py re-execs itself with execv, any buffered
output on stdout may be lost (in particular, messages intended to go
to a bot's log about the re-exec taking place). This patch makes it
flush stdout before execv, similar to the flush before running a
subprocess from the bot that is done to ensure output appears in the
right order.
Committed.
2016-12-16 Joseph Myers <joseph@codesourcery.com>
* scripts/build-many-glibcs.py (Context.exec_self): Flush stdout
before calling execv.
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index a5f7119..9401709 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -93,6 +93,7 @@ class Context(object):
def exec_self(self):
"""Re-execute this script with the same arguments."""
+ sys.stdout.flush()
os.execv(sys.executable, [sys.executable] + sys.argv)
def get_build_triplet(self):
--
Joseph S. Myers
joseph@codesourcery.com