1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Make build-many-glibcs.py flush stdout before execv.

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.

	* scripts/build-many-glibcs.py (Context.exec_self): Flush stdout
	before calling execv.
This commit is contained in:
Joseph Myers
2016-12-16 16:17:13 +00:00
parent b224637928
commit 36820ce9ce
2 changed files with 6 additions and 0 deletions

View File

@ -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):