[Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.

walter harms wharms at bfs.de
Sat Aug 30 10:09:02 UTC 2014



Am 30.08.2014 11:38, schrieb Laurent Bercot:
> On 30/08/2014 10:33, walter harms wrote:
>> Does POSIX specify anyhing about that "--help" ?
> 
>  POSIX does not specify anything about --help. It's a GNU extension,
> like every long option.
> 
>  For true or false, POSIX does not specify any option at all:
>  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/false.html
> 
>  False is supposed to return a non-zero exit code. Nothing else is
> specified. So it applies when arguments are given to false too, no
> matter what those arguments are; and busybox's behaviour is non-compliant.
> 

So i did not miss a footnote somewhere :)

The question is would it break something if --help would return EXIT_FAILURE
everytime ?
(The next problem is true, expected to return EXIT_SUCCESS everytime).
I would say that is ok, since using --help in scripts that continue behind
that point would be error (or strange).
People using true --help and expect a EXIT_SUCCESS have a different problem.

re,
 wh


More information about the busybox mailing list