Understood it well. But didn't understand pipes properly. Can u pls tel me which part of the code represent two pipes and which represent two file descriptors. ?
What i understood that the code does not create the Pipe0 ( in the diagram). It only illustrates the writing of data by child process to Pipe1 and reading of the same data by it's parent from the same Pipe1.
t.purna Chander My dear frd...pipe() will create two file descriptors. With fd[0] represents read end of the pipe and fd[1] represents write end of the pipe
Sir
U r d best one who explains this topic.thanks
Understood it well. But didn't understand pipes properly. Can u pls tel me which part of the code represent two pipes and which represent two file descriptors. ?
What i understood that the code does not create the Pipe0 ( in the diagram). It only illustrates the writing of data by child process to Pipe1 and reading of the same data by it's parent from the same Pipe1.
t.purna Chander
My dear frd...pipe() will create two file descriptors. With fd[0] represents read end of the pipe and fd[1] represents write end of the pipe
file descriptors actually denote pipes...like in file handling we use fp and not 'represent' the whole file
Nice explain