> Do you mean output_pipe[1]?

Yes, fixed, thanks. (Copypasta from the windows file, where this has a different name.)

> I suppose that in theory the subprocess could close this fd early. I don't think it should have an effect other than reduced parallelism though (due to us being blocked on the waitpid).

Right, as far as I understand closing the pipe early will mean that pselect / ppoll will return immediately instead of only after the command finishes, and then ninja will wait in Finish(). This sounds like what you're saying, too.