[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: false --help vs. false --version
From: |
Jim Meyering |
Subject: |
Re: false --help vs. false --version |
Date: |
Thu, 03 Apr 2003 18:59:01 +0200 |
address@hidden (Paul Jarc) wrote:
> Paul Eggert <address@hidden> 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