Build the ./forkmix
program and run it three different ways:
- On the command line:
./forkmix
- With its output sent to a pipe:
./forkmix | less
(typeq
to exitless
) - With its output sent to a file:
./forkmix > f
What is similar and different about these runs? Can you come up
with a hypothesis to explain the differences? (Hint: Use strace
!
For instance, strace -o strace.out ./forkmix
)