Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] zsystem:34: flock: invalid timeout value: '0'
- X-seq: zsh-workers 46148
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [BUG] zsystem:34: flock: invalid timeout value: '0'
- Date: Sat, 27 Jun 2020 19:12:46 +0200
- Cc: Cedric Ware <cedric.ware__bml@xxxxxxxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAH+w=7Zu0Xp2aW-7DTTvF8Ni_eSECzaWW4P=jgpPDNOT942v0g@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVAm3Wp9Gme42qNQeLo=QE8A2ZvcjcyQqw=aRQa2UDNX0w@mail.gmail.com> <20200626141644.7cb5e511@tarpaulin.shahaf.local2> <CAKc7PVCtHg1Pq1qBWBUwdiNe_8w9LXS_3t-2eBSuCg-ZoZnUgw@mail.gmail.com> <20200627014717.68986199@tarpaulin.shahaf.local2> <CAH+w=7YuMOOSbsgop53ZpCGQZ=COGBSS_nMAyS7m6aQ_YmpukA@mail.gmail.com> <20200627071350.zqkdhzbk3mfej2tz@phare.normalesup.org> <CAN=4vMpFpaQg03JbY_B3ktXAEmiUhXH4crdwyc1Ups8Cf=nf8A@mail.gmail.com> <CAH+w=7Zu0Xp2aW-7DTTvF8Ni_eSECzaWW4P=jgpPDNOT942v0g@mail.gmail.com>
- Sender: zsh-workers@xxxxxxx
On Sat, Jun 27, 2020 at 7:01 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Sat, Jun 27, 2020 at 12:27 AM Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
>>
>> Timeout strictly between 0 and 1 microsecond is not much different
>> from timeout between 1 and 2 microseconds. You can either round up or
>> down in both cases. Rounding up is the right thing to do for sleeps
>> and timeouts because it allows you to provide a guarantee.
>
> I would be mildly surprised if this doesn't happen as part of the OS implementation of the operation.
I've a tendency to use an overly direct language that's often
perceived by others (especially Americans) as aggressive. Perhaps I
was overcautious this time. Let me try again.
Any implementation of sleep or timeout must round up. flock in zsh
doesn't round up but it must.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author