comparison mxtool/mx.py @ 4664:60a8f52c0be0

Fixed regression in mx.py
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 21 Feb 2012 19:35:51 +0100
parents b06ade6e927c
children e2de9649f0a9
comparison
equal deleted inserted replaced
4663:77a997c2bf4e 4664:60a8f52c0be0
601 601
602 if not callable(out) and not callable(err) and timeout is None: 602 if not callable(out) and not callable(err) and timeout is None:
603 # The preexec_fn=os.setsid 603 # The preexec_fn=os.setsid
604 p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags) 604 p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags)
605 _currentSubprocess = (p, args) 605 _currentSubprocess = (p, args)
606 waitOn(p) 606 retcode = waitOn(p)
607 else: 607 else:
608 def redirect(stream, f): 608 def redirect(stream, f):
609 for line in iter(stream.readline, ''): 609 for line in iter(stream.readline, ''):
610 f(line) 610 f(line)
611 stream.close() 611 stream.close()