I am not very sure how to create a pipe between two child processes. This is the way I did it:
pipe(&fd[0]); //Create a pipe pr
The best answer I can give is Beej's Guide to Unix IPC.
(Peek at section 4.3, where he gives a very similar example to the question you asked...)