printf anomaly after “fork()”
I note that <system.h> is a non-standard header; I replaced it with <unistd.h> and the code compiled cleanly. When the output of your program is going to a terminal (screen), it is line buffered. When the output of your program goes to a pipe, it is fully buffered. You can control the buffering mode by … Read more