well,
standard formatted output is normally buffered and given that fork copies (almost) everything from parent to child it's natural to have that output...
..but under normal circumstances, as far as i know, printf is supposed to flush the output buffer with every newline character...and you are indeed using \n which means this is probably a bug in printf... (???)
try writing to stderr with fprintf..stderr is always flushed.
|