[Bug: Busybox 1.22.1] false return 0 instead of 1 with '--help' switch.
Harald Becker
ralda at gmx.de
Tue Sep 2 18:22:36 UTC 2014
Hi Joshua !
> It's also interesting that busybox "false --help" behaves completely
> differently
> depending on whether it's invoked from within a busybox shell or not:
This is wrong! You called different versions, not Busybox false.
> * invoking "false" as an ash builtin bypasses the "--help" check,
> does not print the usage message, and exits with EXIT_FAILURE
> per false_main().
Here you probably used a shell function, which overrides the applet in
Busybox.
Look in your profile or sourced scripts, anywhere there I expect a
definition like: "false() { return 1; }"
This case is not concerned with the question which Busybox false shall
return. The maintainer of your profile script is inquestion, for what
your shell function does.
> * invoking "false" directly as "/bin/false" or "busybox false"
> bypasses false_main(), prints the usage message, and exits
> with 0 per run_applet_no_and_exit().
This is due to common handling of --help in Busybox. The common code
displays the usage message and exits.
--
Harald
More information about the busybox
mailing list