diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/sleep.c | 5 |
1 files changed, 5 insertions, 0 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 */ |