[EMAIL PROTECTED] (Paul Jarc) wrote: > Paul Eggert <[EMAIL PROTECTED]> wrote: >> I love poking sticks into hornets' nests, so I can't resist mentioning >> that coreutils "true" sometimes returns false: >> >> $ ./true --version >&- >> ./true: write error: Bad file number >> $ echo $? >> 1 > > Hm - I can't reproduce this. > > $ `which true` --version > true (GNU coreutils) 4.5.12 > Written by Jim Meyering. > > Copyright (C) 2003 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > $ `which true` --version >&-; echo $? > 0 > $ `which true` --help >&-; echo $? > 0 > > glibc 2.3.2, if that makes a diffference.
Odd. I can reproduce it with glibc 2.3.1, bash 2.05b.0, and x86 linux-2.4.19: $ strace -e close ./true --version >&- close(1) = 0 close(1) = 0 close(1) = -1 EBADF (Bad file descriptor) ./true: write error: Bad file descriptor _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
