mirror of
https://git.busybox.net/busybox.git
synced 2024-11-27 07:33:26 +08:00
sleep: fix error exit when called as "sh" builtin
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
478b5ac2bc
commit
550e6d8fbd
@ -74,7 +74,8 @@ int sleep_main(int argc UNUSED_PARAM, char **argv)
|
||||
++argv;
|
||||
if (!*argv) {
|
||||
/* Without this, bare "sleep" in ash shows _ash_ --help */
|
||||
if (ENABLE_ASH_SLEEP && applet_name[0] != 's') {
|
||||
/* (ash can be the "sh" applet as well, so check 2nd char) */
|
||||
if (ENABLE_ASH_SLEEP && applet_name[1] != 'l') {
|
||||
bb_simple_error_msg("sleep: missing operand");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user