I found this question, and was watching for an answer.
Eventually, the user answered their own question, but then 4 minutes after answering it, they deleted their answer. Their (deleted) answer sounds valid to me, and no one else has answered. I posted a comment on the question asking if the user would consider undeleting their answer, and someone else (under 10K) posted that they'd like to know the results. In almost 3 days, the user has not responded at all.
I was considering copying their answer verbatim and posting it as a community wiki with a line attributing the answer to the OP. But it occurred to me that that could be against their wishes - after all, they must have had a reason for deleting their answer in the first place, and I don't know the topic enough to be certain that their answer was right.
Should I repost the answer as a community wiki, or just leave the answer deleted?
For the <10k users, here's the answer in question:
I figured it out: apparently the proc.stdout stream object is automatically doing its own internal buffering, despite the bufsize = 0 argument passed to subprocess.Popen. The stream object seems to automatically buffer data available for reading on the pipe's stdout file descriptor behind the scenes.
So basically, I can't use os.read to read directly from the underlying descriptor, because the proc.stdout BufferedReader is automatically doing it's own buffering by reading from the underlying descriptor. To get this working as I want, I can simply call proc.stdout.read(READ_SIZE) instead of os.read(fd, READ_SIZE) directly, after poll() indicates there is data to be read. That works as expected.