Fix Chatty subprocess test, call callback on hangup
Summary:
The Chatty subprocess test incorrectly assumed that we saw EOF on the last
read from the child (that is, read() returned 0). That's not the case for two
reasons: 1. the child is allowed to stall right before it closes its stdout, in
which case we get EAGAIN, and 2. Subprocess::communicate would close the fd
without calling the read callback anyway. Fix both such things.
Test Plan: ran test
Reviewed By: njormrod@fb.com
FB internal diff:
D1303215