aboutsummaryrefslogtreecommitdiff
path: root/Config.in
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-09 17:41:49 -0800
committerRob Landley <rob@landley.net>2019-03-10 23:00:19 -0500
commit502b10c2ab6bb273bf280ba355fa30869b955d56 (patch)
tree5f88f0ccaf0e0ed3c7ca75338b680d5e442811e3 /Config.in
parentac9eea4afb88ca0785c1ea4c665b1744afc3009a (diff)
downloadtoybox-502b10c2ab6bb273bf280ba355fa30869b955d56.tar.gz
timeout: --foreground, --preserve-status, and --signal.
--signal is simply a synonym for the exiting -s. --foreground disables functionality we didn't yet have: putting the child into a new process group. I've added the functionality and the flag to disable it. --preserve-status also makes it clear that our exit statuses didn't match the coreutils version. In addition to callers that use --preserve-status to get away from this madness, I also have callers that check for specific exit values. This patch implements --preserve-status but also fixes all the other exit statuses. (The "125" exit value is broken for toybox in the same way that `toybox grep --whoops ; echo $?` is. To fix this, we'd need some way to signal that command-line parsing failures should exit with a different value than the usual 1 --- 2 for grep, 125 for timeout. I've done as much as grep manages, and left a TODO.) Also add timeout tests. I couldn't think of an easy test for --foreground, so I tested that manually with strace. Also add some newlines to the `toybox --help` output to make it easier to find the different sections, and expand the section on durations to call out that fractions are supported as a matter of policy. As long as timeout and sleep have text describing the duration syntax, make them the same. (Personally I'd remove both in favor of the `toybox --help` output, but as long as they're duplicated, keep them consistent.) Also remove the SLEEP_FLOAT variant --- xparsetime means that sleep no longer requires floating point to support sub-second resolution.
Diffstat (limited to 'Config.in')
-rw-r--r--Config.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/Config.in b/Config.in
index 2136dae8..16a04f90 100644
--- a/Config.in
+++ b/Config.in
@@ -28,11 +28,14 @@ config TOYBOX
--help Show command help (only)
--version Show toybox version (only)
- The filename "-" means stdin/stdout, "--" stops argument parsing,
- and numerical arguments accept a single letter suffix for
+ The filename "-" means stdin/stdout, and "--" stops argument parsing.
+
+ Numerical arguments accept a single letter suffix for
kilo, mega, giga, tera, peta, and exabytes, plus an additional
- "d" to indicate decimal 1000's instead of 1024. Durations take
- minute, hour, or day suffixes (ala 0.1m = 6s).
+ "d" to indicate decimal 1000's instead of 1024.
+
+ Durations can be decimal fractions and accept minute ("m"), hour ("h"),
+ or day ("d") suffixes (so 0.1m = 6s).
config TOYBOX_SUID
bool "SUID support"