Parent process needs to close write end of pipe before reading