sleep: fix error exit when called as "sh" builtin
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
		| @@ -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; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user