aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/sleep.c5
-rw-r--r--miscutils/bc.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 5c9cda9f0..7bfaab920 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -68,6 +68,11 @@ int sleep_main(int argc UNUSED_PARAM, char **argv)
if (!*argv)
bb_show_usage();
+ /* GNU sleep accepts "inf", "INF", "infinity" and "INFINITY" */
+ if (strncasecmp(argv[0], "inf", 3) == 0)
+ for (;;)
+ sleep(INT_MAX);
+
#if ENABLE_FEATURE_FANCY_SLEEP
# if ENABLE_FLOAT_DURATION
/* undo busybox.c setlocale */
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 74884557a..bf174dafb 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -7407,4 +7407,3 @@ int dc_main(int argc UNUSED_PARAM, char **argv)
#endif
#endif // DC_BIG
-