mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue