I am just learning about pipes, fifo and I have a question.
What happen if one program opens a pipe for reading and another program opens a pipe for writing. The two programs run in paralel. Let's say that the first program tries to read form pipe, but there is no information so it's block until the second program writes something.
In the second step, the first program is faster, and tries to read again form pipe. This time there is some information from the last time. What does the program do? Does it read the information from the last time?
Thanks!