Mercurial > hg > truffle
changeset 15898:c102edf38127
mx: prevent CTRL-C from being blocked while subprocess is running (re-applied without unrelated changes)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 26 May 2014 12:55:17 +0200 |
parents | c5f57314599d |
children | e065b9746246 |
files | mxtool/mx.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mxtool/mx.py Mon May 26 12:52:02 2014 +0200 +++ b/mxtool/mx.py Mon May 26 12:55:17 2014 +0200 @@ -1525,8 +1525,11 @@ # Don't make the reader thread a daemon otherwise output can be droppped t.start() joiners.append(t) - for t in joiners: - t.join() + while any([t.is_alive() for t in joiners]): + # Need to use timeout otherwise all signals (including CTRL-C) are blocked + # see: http://bugs.python.org/issue1167930 + for t in joiners: + t.join(10) if timeout is None or timeout == 0: retcode = waitOn(p) else: