7 ms·
I thought this is a general unix thing. stdout is buffered so output to other apps/terminal is efficient, whilst stderr isn’t buffered because it’s usually to
by helsinkiandrew 3y ago
I thought this is a general unix thing. stdout is buffered so output to other apps/terminal is efficient, whilst stderr isn’t buffered because it’s usually to the console with (smaller) error messages that should be seen immediately in case of app crashes etc.
- loeg 3y agoPOSIX only specifies that stderr in C programs isn't block ("fully") buffered by default. I believe it allows for line buffering. https://pubs.opengroup.org/onlinepubs/9699919799/functions/stdin.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/s... POSIX doesn't govern Rust at all.