How do I chain stdout in one child process to stdin in another child in C?
I've been messing around in C trying to figure out how to do this. Let's say I have my main program, the parent process. The parent creates three child processes, each of which will eventually run programs (but that's not important right now). What I'd like to do is make it so that the first child's stdout will be received by the second child's stdin. The second child's stdout will then be received by the third child's stdin. The parent process's stdin/stdout aren't messed with at all. So far, what I've got is pipe(procpipe); parentPid = getpid(); for(i = 0; i < 3; i++) { if(getpid() ==