[Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.
tito
farmatito at tiscali.it
Mon Sep 1 12:03:01 UTC 2014
On Monday 01 September 2014 12:40:06 Bastian Bittorf wrote:
> * Laurent Bercot <ska-dietlibc at skarnet.org> [01.09.2014 12:36]:
> > Note the "always", which is not necessary, but serves to drive the point home.
> > I maintain that false is NEVER allowed to return 0, --help or not.
>
> i agree. the discussion is a little but driving away IMHO, because:
> (i wrote already)
>
> i cannot see a bug here on OpenWrt:
>
> root at box:~ busybox false --help
> BusyBox v1.22.1 (2014-08-28 18:55:30 EDT) multi-call binary.
>
> Usage: false
>
> Return an exit code of FALSE (1)
>
> root at box:~ echo $?
> 0
>
> root at box:~ false --help
> root at box:~ echo $?
> 1
>
> root at box:~ false -help
> root at box:~ echo $?
> 1
>
> root at box:~ false bla
> root at box:~ echo $?
> 1
>
> so: where is the problem?
Hi,
debian:~/Desktop/SourceCode/busybox$ ./busybox false
debian:~/Desktop/SourceCode/busybox$ echo $?
1
debian:~/Desktop/SourceCode/busybox$ ./busybox false --help
BusyBox v1.23.0.git (2014-08-28 23:28:50 CEST) multi-call binary.
Usage: false
Return an exit code of FALSE (1)
debian:~/Desktop/SourceCode/busybox$ echo $?
0
debian:~/Desktop/SourceCode/busybox$ mv busybox false
debian:~/Desktop/SourceCode/busybox$ ./false
debian:~/Desktop/SourceCode/busybox$ echo $?
1
debian:~/Desktop/SourceCode/busybox$ ./false --help
BusyBox v1.23.0.git (2014-08-28 23:28:50 CEST) multi-call binary.
Usage: false
Return an exit code of FALSE (1)
debian:~/Desktop/SourceCode/busybox$ echo $?
0
debian:~/Desktop/SourceCode/busybox$
Ciao,
Tito
More information about the busybox
mailing list