Hi Collin, > Here is the result when standard output is redirected to /dev/full: > > $ ldd --version | head -n 1 && gcc main.c && ./a.out > /dev/full > ldd (GNU libc) 2.42 > v1: 9 > v2: -1 > v3: 0 > > $ ldd --version 2>&1 | head -n 2 && gcc main.c && ./a.out > /dev/full > musl libc (i386) > Version 1.2.5 > v1: -1 > v2: 0 > v3: 0 > ... > POSIX says the following [1]: > > When opened, stderr shall not be fully buffered; stdin and stdout > shall be fully buffered if and only if the file descriptor > associated with the stream is determined not to be associated with > an interactive device.
So, if I understand it correctly: - glibc considers /dev/full to be non-interactive, - musl libc considers /dev/full to be interactive. Can you show (via 'strace') the system calls related to fd = 1, that make this determination, in the two cases? Bruno
