CS208 Introduction to Computer Systems Friday, 27 February 2026 + pipes - pipe.c - look at the pictures for "ls -a | wc -l" - before - after fork + fork - what we want - Is it important for child1 to execute before child2? - What if child2 goes first? mess with file descriptors (so stdin=pipe) exec wc -l wc tries to read from stdin, but there's nothing there so, child2 goes to sleep until there's something in the pipe to resolve the "read" operation - what's in a pipe? some kind of buffer for the bytes (some kind of circular queue) a lock -- so child1 and child2 don't mess up the queue by trying to modify it simultaneously