During Popen.communicate(), if a signal is caught during the select(), an unhandled exception is raised, and the output gathered is lost. This means that a long running or hanged process can't be killed after a timeout (as shown in the attached example, where the output collected before the signal is valuable) The bug happens only when stdout and stderr are not merged and is tested on linux platform.
First, this patch has a possible bug: if select() fails on the first iteration, wlist is left undefined, and the next instruction "if self.stdin in wlist" will fail. Second, I think that is is not a good idea to simply exit the loop on the first signal. In your script, select() is interrupted because of SIGALRM (try removing the call to os.kill), and there may be more data to read. A possible solution could be: try: ...select.select()... except select.error, e: if e.args[0] == errno.EINTR: continue # try again else: raise else: ...exchange data...