-
In the way the scripts starts it subprocesses, stderr becomes buffered for the subprocesses. And unforunately, when the buffer limit is reached, the subprocess suspends it work until it can print again on stderr. That's why the python script runs into a deadlock when the subprocess produces a lot of error messages. A small rearrange of the commands, first read the stderr output and then wait that the subprocess ends, will remove this deadlock.
c2378609