[PATCH] Really fix unexpected exits in execReadlines

Chris Lumens clumens at redhat.com
Fri Sep 26 13:45:09 UTC 2014

> Due to the asynchronous nature of signal delivery, it's possible to
> check on the execReadlines child process at a point where output has
> been closed but the process is still, technically, alive. This situation
> appeared in particular when running the nosetests on a system with one
> CPU. To make the behavior of reading a line from an exiting process
> deterministic, wait for the process to finish when output is complete.
> The consequence of this is that processes that runs forever will cause
> execReadlines to block forever, and the answer is to not run such a
> process with execReadlines.
> Also revert to and make intentional the old, accidental behavior of
> raising OSError any time the process exits with a non-0 status, since
> that actually seems more useful than just looking for signal exits.

Looks good to me, and fixes a problem I am seeing in jenkins.  Hooray.

- Chris

More information about the anaconda-patches mailing list