address@hidden (Paul Jarc) wrote:
> I wrote:
>> glibc 2.3.2, if that makes a diffference.
>
> It does: apparently, glibc 2.3.2 opens stdin, stdout, and stderr to
> /dev/null if they're not already open. So by the time main() is
> called, they will always be open.
Thanks for investigating.
FWIW, you can still reproduce the behavior even with glibc 2.3.2:
./true --version > /dev/full
./true: write error: No space left on device
[Exit 1]