I need to use fork and pipe to read a text file. This is an assignment for a class.
Basically, I need to make 4 subprocesses to each read a portion of the input file, do some processing and return a result to the parent process so it can aggregate the children's results.
From what I understand, I should use fork to create the children, then pipe to tell each child which part of the file to do.
My question is, how do I use pipe. How do I know which child process I am talking to?