# HG changeset patch # User Doug Simon # Date 1401101717 -7200 # Node ID c102edf3812701558834c267bef776c7a402250d # Parent c5f57314599d53fc488a78927864860b9e27a48a mx: prevent CTRL-C from being blocked while subprocess is running (re-applied without unrelated changes) diff -r c5f57314599d -r c102edf38127 mxtool/mx.py --- 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: