[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sleep: support subtraction of sleep amounts
From: |
Bernhard Voelker |
Subject: |
Re: [PATCH] sleep: support subtraction of sleep amounts |
Date: |
Wed, 30 Jul 2014 09:36:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/30/2014 01:01 AM, Eric Blake wrote:
> You may want to improve this usage:
>
> $ src/sleep -- -inf inf
> src/sleep: cannot read realtime clock: Invalid argument
>
> to give a nicer message.
Here comes v2.
$ src/sleep -- -inf inf
src/sleep: invalid total sleep time -nan
Try 'src/sleep --help' for more information.
I added some more test cases for invalid combinations
with nan, -nan and -inf, and avoided multiple diagnostic
messages in the case a single argument already was
considered !ok like in 'sleep -- abc -inf'.
Finally, there was a stray "Conflicts: NEWS" in the commit
message of v1, sorry for that.
Any comments about the possible timeout races?
(I didn't get failures here, even with high load and
'make check -j'.)
Thanks & have a nice day,
Berny
0001-sleep-support-subtraction-of-sleep-amounts-v2.patch
Description: Text Data