Mercurial > hg > truffle
comparison mxtool/mx.py @ 4461:539fca6a3b98
Merge
author | Christian Haeubl <christian.haeubl@oracle.com> |
---|---|
date | Thu, 02 Feb 2012 16:07:52 -0800 |
parents | 4023bae16d02 |
children | 7903b6c28f9c |
comparison
equal
deleted
inserted
replaced
4460:b9e6576eefe7 | 4461:539fca6a3b98 |
---|---|
590 | 590 |
591 if not callable(out) and not callable(err) and timeout is None: | 591 if not callable(out) and not callable(err) and timeout is None: |
592 # The preexec_fn=os.setsid | 592 # The preexec_fn=os.setsid |
593 p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags) | 593 p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags) |
594 _currentSubprocess = (p, args) | 594 _currentSubprocess = (p, args) |
595 retcode = p.wait() | 595 if get_os() == 'windows': |
596 # on windows use a poll loop, otherwise signal does not get handled | |
597 retcode = None | |
598 while retcode == None: | |
599 retcode = p.poll() | |
600 time.sleep(0.05) | |
601 else: | |
602 retcode = p.wait() | |
596 else: | 603 else: |
597 def redirect(stream, f): | 604 def redirect(stream, f): |
598 for line in iter(stream.readline, ''): | 605 for line in iter(stream.readline, ''): |
599 f(line) | 606 f(line) |
600 stream.close() | 607 stream.close() |