Flushing stdout & stderr before calling Popen to avoid

messages display desinchronisation.
This commit is contained in:
Jean-Paul Chaput 2010-04-20 11:11:08 +00:00
parent 2daae9a939
commit a52ca4fa3d
1 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,8 @@ class ProjectBuilder:
def _execute ( self, command, error ):
sys.stdout.flush ()
sys.stderr.flush ()
child = subprocess.Popen ( command, env=self._environment, stdout=None )
(pid,status) = os.waitpid ( child.pid, 0 )
status >>= 8
@ -179,6 +181,7 @@ class ProjectBuilder:
if self._doBuild:
print "Make arguments:", self._makeArguments
sys.stdout.flush ()
command = ["make", "DESTDIR=%s" % self._installDir]
command += self._makeArguments
self._execute ( command, "Build failed" )