Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14540

Re: Add sleep builtin

From L A Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject Re: Add sleep builtin
Date 2018-08-27 10:57 -0700
Message-ID <mailman.8.1535393024.1284.bug-bash@gnu.org> (permalink)
References <CAJnmqwZ1GUZRtGRHt8xy_-tdTjVsAQKt-toGAEn5e9gjFrR0vQ@mail.gmail.com> <83513822-23BF-4695-9542-F967512A8A3D@gmail.com> <5B7CB832.4080004@tlinx.org> <20180822122211.2fgtiendc3h3p3cf@eeg.ccf.org> <20180825160259753625394@bob.proulx.com>

Show all headers | View raw



On 8/25/2018 3:16 PM, Bob Proulx wrote:
> Greg Wooledge wrote:
>   
>> If true, that would actually violate POSIX.
>> You might be remembering it wrong.
Naw...just the marginalia that Bob mentions...
>
> I also remember that at one time the Unix sleep was implemented by
> polling a second granularity clock register.  If one was not lucky
> then polling just before the second turned, and then just after, would
> cause sleep to exit because the second had changed.  A 1 second sleep
> was 0-1 seconds. 
>
> And certainly any using the fractional second extension is past any
> need to worry about the problem.  Because any such system with the
> problem would only handle to a granularity of integer seconds anyway.
>   
---
    I'd hope such would be the case, but as soon as I'd expect such
sane behavior, I'd run into a more simplistic implementation that
met the letter if not intent of some requirement...so such things
tend to stick in my head as possible, though not very useful
implementations.

    I certainly would not take the ever-changing POSIX spec as
a guide to what actually exists or is implemented in the field.
POSIX moved away from their original mission statement of being
"descriptive" to one that is "prescriptive" a long time ago,
with "prescriptive" being based on the wants and desires of
its current membership with little or no regard for usability
or compatibility.



Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Add sleep builtin L A Walsh <bash@tlinx.org> - 2018-08-27 10:57 -0700

csiph-web