看板 DFBSD_submit 關於我們 聯絡資訊
: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