From 99912ca733dd960f5589227fd999c86e73c8e894 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 10 Apr 2007 15:43:37 +0000 Subject: audit small applets and mark some of them as NOFORK. Put big scary warnings in relevant places. --- coreutils/sleep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'coreutils/sleep.c') diff --git a/coreutils/sleep.c b/coreutils/sleep.c index b89b0fe9c..592005bab 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -18,12 +18,12 @@ * time suffixes for seconds, minutes, hours, and days. */ -#include -#include -#include #include "busybox.h" -#ifdef CONFIG_FEATURE_FANCY_SLEEP +/* This is a NOFORK applet. Be very careful! */ + + +#if ENABLE_FEATURE_FANCY_SLEEP static const struct suffix_mult sfx[] = { { "s", 1 }, { "m", 60 }, @@ -36,9 +36,9 @@ static const struct suffix_mult sfx[] = { int sleep_main(int argc, char **argv); int sleep_main(int argc, char **argv) { - unsigned int duration; + unsigned duration; -#ifdef CONFIG_FEATURE_FANCY_SLEEP +#if ENABLE_FEATURE_FANCY_SLEEP if (argc < 2) { bb_show_usage(); @@ -50,7 +50,7 @@ int sleep_main(int argc, char **argv) duration += xatoul_range_sfx(*argv, 0, UINT_MAX-duration, sfx); } while (*++argv); -#else /* CONFIG_FEATURE_FANCY_SLEEP */ +#else /* FEATURE_FANCY_SLEEP */ if (argc != 2) { bb_show_usage(); @@ -58,7 +58,7 @@ int sleep_main(int argc, char **argv) duration = xatou(argv[1]); -#endif /* CONFIG_FEATURE_FANCY_SLEEP */ +#endif /* FEATURE_FANCY_SLEEP */ if (sleep(duration)) { bb_perror_nomsg_and_die(); -- cgit v1.2.3-55-g6feb