Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] zsystem:34: flock: invalid timeout value: '0'



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