|
|
|
|
|
by mtdewcmu
4373 days ago
|
|
That was a contrived example. The shell sets up the pipe and file redirections for each process in the pipeline, then lets them go. It has no control over when the child processes read or write. It could be a race condition, but it's written in such a way that it appears that the file will get truncated before it can be read virtually 100% of the time. |
|