summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-16 12:07:46 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-16 12:10:45 -0700
commit240a63375697be8f3ff0fb97aea35ef2fecf1f4d (patch)
tree4a24d1c077bbe0ef3d552a20c4fd5c8d668405b1 /man
parent2d9b49789fadd039d43e5c1b6d09bebcc075227f (diff)
downloadcoreutils-240a63375697be8f3ff0fb97aea35ef2fecf1f4d.tar.xz
timeout: treat seconds counts like 'sleep' does
Treat fractions as a request to round up to the next representable value, and treat out-of-range values as maximal ones. This is consistent with how "sleep" works. And this way, "timeout 999999999999999999d FOO" and "timeout 4.5 foo" are more likely to do what the user wants. * src/timeout.c: Include c-strtod.h and xstrtod.h, not xstrtol.h. (apply_time_suffix): Change it to the way sleep.c's time_suffix does things. Maybe this function (identical in both programs, other than its name) should be moved to a library? (parse_duration): Return a maximal value on overflow. Return unsigned int, not unsigned long. Allow fractions, which round up to the next integer value. * tests/misc/timeout-parameters: Adjust tests to match new behavior. Add a very large number.
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions