aboutsummaryrefslogtreecommitdiffstats
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2025-04-05 20:26:23 +0100
committerPádraig Brady <P@draigBrady.com>2025-04-06 00:07:37 +0100
commit65b694257f04a8b5b566e35c58a0ba5b51f8a06c (patch)
tree2c3ad6344c15a3a1621fced1a3452abf12387244 /doc/coreutils.texi
parentmaint: adjustments to recent timeout change (diff)
downloadcoreutils-65b694257f04a8b5b566e35c58a0ba5b51f8a06c.tar.gz
coreutils-65b694257f04a8b5b566e35c58a0ba5b51f8a06c.zip
doc: mention the edge case of hex durations with 'd' suffix
* doc/coreutils.texi (sleep invocation): Mention that suffixes are best avoided with hex arguments. (timeout invocation): Likewise. * tests/misc/sleep.sh: Ensure 'd' is not interpreted as "day".
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index d6633f04c..2d1f162aa 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -18913,6 +18913,11 @@ C locale (@pxref{Floating point}) followed by an optional unit:
@samp{h} for hours
@samp{d} for days
@end display
+@macro hexDuration
+Note it's best to avoid combining suffixes with hexadecimal arguments,
+as any @samp{d} will @emph{not} be interpreted as a suffix.
+@end macro
+@hexDuration
A duration of 0 disables the associated timeout.
The actual timeout duration is dependent on system conditions,
which should be especially considered when specifying sub-second timeouts.
@@ -19089,6 +19094,8 @@ non-negative integer argument without a suffix, GNU @command{sleep}
also accepts two or more arguments, unit suffixes, and floating-point
numbers in either the current or the C locale. @xref{Floating point}.
+@hexDuration
+
For instance, the following could be used to @command{sleep} for
1 second, 234 milli-, 567 micro- and 890 nanoseconds: