On Fri, Feb 09, 2018 at 05:41:34PM -0600, Scott Cheloha wrote:
> Hi,
> nanosleep(2) won't take more than 100 million seconds at a time,
> so we ought to cap interval when we read it in.  Otherwise, an
> oversized interval argument causes iostat(8) to print as fast as
> it can.
> While here, "interval" is called "wait" in the documentation when
> the new syntax is in use, so we should call it that in the error
> message for the '-w' flag.
> ok?

I'm wondering if it wouldn't be better to check nanonsleep's return
value and do err(1, "nanosleep"); if it fails. This way we don't have
to remember to modify iostat if we ever change nanosleep to support
longer timeouts.

Reply via email to