Re:S p a m m y s y s C a l l s in strace dumps
by dn3500 on Friday January 06, 2023 @10:38AM
(#34275852)
You have to be careful drawing conclusions about output buffering when you're using this kind of stdout redirection tool. The stdio library changes its buffering behavior depending on what stdout is connected to. For example, if stdout is a file, the stream is fully buffered, but if it's a tty, the stream is line buffered. I don't know what it does if stdout is a pipe.
[ Parent
| on HN ]
Re:S p a m m y s y s C a l l s in strace dumps
by mananaysiempre on Friday January 06, 2023 @12:41PM
(#34278071)
If it’s a pipe, then it’s the same as for a regular file. POSIX says[1] “the standard input and standard output streams are fully buffered if and only if the stream can be determined not to refer to an interactive device”; the Glibc implementation[2] looks at isatty().
[1] https://man7.org/linux/man-pages/man3/stdin.3p.html
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/filed...