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




  • misc/io-errors fails on ... Bruno Haible via GNU coreutils General Discussion
    • Re: misc/io-errors ... Collin Funk
      • Re: misc/io-err... Bruno Haible via GNU coreutils General Discussion
        • Re: misc/io... Collin Funk
          • Re: mis... Bruno Haible via GNU coreutils General Discussion
            • Re... Collin Funk
              • ... Bruno Haible via GNU coreutils General Discussion
                • ... Bruno Haible via GNU coreutils General Discussion
                • ... Collin Funk
                • ... Bruno Haible via GNU coreutils General Discussion
                • ... Collin Funk
                • ... Bruno Haible via GNU coreutils General Discussion
                • ... Collin Funk
                • ... Bruno Haible via GNU coreutils General Discussion

Reply via email to