Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 2002 14:47:46 -0500 (EST)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Nate Lawson <nate@root.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: sleep(1) behavior
Message-ID:  <200211131947.gADJlkfV066489@khavrinen.lcs.mit.edu>
In-Reply-To: <Pine.BSF.4.21.0211131125300.39871-100000@root.org>
References:  <200211131903.gADJ3OuR066070@khavrinen.lcs.mit.edu> <Pine.BSF.4.21.0211131125300.39871-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 13 Nov 2002 11:26:44 -0800 (PST), Nate Lawson <nate@root.org> said:

> So "sleep -1" should sleep for ~0UL seconds?  And should usage() ever be
> called then?

Well, the standard says that anything might happen as a result of
`sleep -- -1'.  I'm just pointing out why the standard says so.
(This sort of thing is what is referred to in the standards jargon as
``quality of implementation'' -- the standard doesn't require an error
for this case, because doing so would require implementations to
partially reimplement strtoul() in the sleep utility, just to validate
the argument.  The standard does not prohibit an implementor from
going to this effort, however, and if you are already using strtod()
instead of strtoul(), there's no additional effort required.)

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211131947.gADJlkfV066489>