diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-07-30 15:29:13 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-07-30 17:40:43 +0200 |
commit | c9871986eb4c6d526a1f4d92a8280b6e54bf07df (patch) | |
tree | 37b37d66a4931a93c7758b64a955723b47b516ff /tests | |
parent | 2ac2cace153dd19aaff5d3e0e6ce68d03146ca92 (diff) | |
download | coreutils-c9871986eb4c6d526a1f4d92a8280b6e54bf07df.tar.xz |
tail: properly parse fractional seconds when monitoring a pid
* src/tail.c (tail_forever_inotify): The fractional
part of the delay was 1000 times too large.
* tests/tail-2/pid: Add a test to ensure the
timeout happens for this case.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tail-2/pid | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tail-2/pid b/tests/tail-2/pid index 446c6dbe3..b290f012c 100755 --- a/tests/tail-2/pid +++ b/tests/tail-2/pid @@ -70,4 +70,8 @@ fi getlimits_ tail --pid=$INT_MAX -f /dev/null || fail=1 +# Ensure fractional sleep parameter is honored with --pid +timeout 1 tail -s.1 -f /dev/null --pid=$PID_T_MAX +test $? = 124 && fail=1 + Exit $fail |