Currently we only exit the communicate loop when we get an EOF from stdout and stderr. If the child process forks before exiting, the fork will inherit those file descriptors and communicate will hang until the child exits. By yielding the status to a block passed to communicate after reading from self_read, we allow the caller to break out of communicate instead of hanging. This is an alternative to #39.
Currently we only exit the
communicate
loop when we get an EOF from stdout and stderr. If the child process forks before exiting, the fork will inherit those file descriptors andcommunicate
will hang until the child exits. By yielding the status to a block passed tocommunicate
after reading fromself_read
, we allow the caller to break out ofcommunicate
instead of hanging. This is an alternative to #39.r? @nelhage-stripe