i have a very simple c/c++ program that forks a child process to execute another program, and then sends some data to that child program, and waits for the response.

the child program reads from stdin and waits for EOF before it continues.

my problem is, the child program receives the initial input from the pipe writing, but it never sees an EOF (even though I close the pipe), so it waits forever.

i'm not sure why closing the pipe doesn't imply the EOF for the child's stdin?

here's the code:

<http://gist.github.com/621210>