How do you check that you don't receive anything? Does it hang or finish?
OS behaviour can vary depending on the size of buffers and blocking behaviour of pipes. A good guard against that is the way that runcommandloop does it by always first checking how many bytes are available and then read those.