aboutsummaryrefslogtreecommitdiff
path: root/coreutils/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/sleep.c')
-rw-r--r--coreutils/sleep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 126665839..7bfaab920 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -13,7 +13,7 @@
13 * time suffixes for seconds, minutes, hours, and days. 13 * time suffixes for seconds, minutes, hours, and days.
14 */ 14 */
15//config:config SLEEP 15//config:config SLEEP
16//config: bool "sleep (1.7 kb)" 16//config: bool "sleep (2 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: sleep is used to pause for a specified number of seconds. 19//config: sleep is used to pause for a specified number of seconds.
@@ -68,6 +68,11 @@ int sleep_main(int argc UNUSED_PARAM, char **argv)
68 if (!*argv) 68 if (!*argv)
69 bb_show_usage(); 69 bb_show_usage();
70 70
71 /* GNU sleep accepts "inf", "INF", "infinity" and "INFINITY" */
72 if (strncasecmp(argv[0], "inf", 3) == 0)
73 for (;;)
74 sleep(INT_MAX);
75
71#if ENABLE_FEATURE_FANCY_SLEEP 76#if ENABLE_FEATURE_FANCY_SLEEP
72# if ENABLE_FLOAT_DURATION 77# if ENABLE_FLOAT_DURATION
73 /* undo busybox.c setlocale */ 78 /* undo busybox.c setlocale */