[repost] Patch to make cpdup's stdout unbuffered
Matthew Dillon
dillon at apollo.backplane.com
Tue Jun 8 16:23:31 PDT 2004
:Now, we could add a flag for every single program to write unbuffered
:(linebuffered) output. Or we could do some (non-POSIX?) magic in libc
:to get most of this just fixed by doing a env
:LIBC_STDOUT_BUFFERING=line $program or whatever...
:
:opinions about this?
:
:cheers
: simon
Say what? No, we are not hacking up libc to turn off buffering in some
magic way. Buffering is what you want for the vast, vast majority
of programs that are run from the command line. We certainly are not
going to add yet another environment variable that libc has to check
every time a program is started up.
Just add an option to cpdup that calls setvbuf() on stdout.
-Matt
More information about the Submit
mailing list