2 ms·
"(Note that programs that run other programs need to do more than just this; they need to flush stdout and perhaps stderr before they start another program.)"
by j_baker 17y ago
"(Note that programs that run other programs need to do more than just this; they need to flush stdout and perhaps stderr before they start another program.)"
Could someone explain exactly why this is?
- mbreese 17y agoBecause you want to make sure your output is sent before the possible output from a child program. This is the same principle as from the article.
- lil_cain 17y agoBecause if they start another program without flushing their buffers, you'll have the output from the new program before the output from the old program, despite the fact that chronologically, the errors were generated before it started.