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 46135
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [BUG] zsystem:34: flock: invalid timeout value: '0'
- Date: Fri, 26 Jun 2020 19:04:25 -0700
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <20200627014717.68986199@tarpaulin.shahaf.local2>
- 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>
- Sender: zsh-workers@xxxxxxx
On Fri, Jun 26, 2020 at 6:48 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
wrote:
>
> Regarding the actual bug report, the next steps are for the
> aforementioned commit to be confirmed as causing an unintended
> behaviour change and for a test and a patch to be written.
>
It's pretty obvious that the patch caused the change:
+ if (timeout < 1e-6 || timeout > 1073741823.) {
+ zwarnnam(nam, "flock: invalid timeout value: '%s'",
+ optarg);
+ return 1;
+ }
Similarly:
+ if (timeout_param.u.d < 1
+ || timeout_param.u.d > 0.999 * LONG_MAX) {
+ zwarnnam(nam, "flock: invalid interval value: '%s'",
+ optarg);
+ return 1;
+ }
I don't know enough about dealing with the float-valued time specs to be
sure what to do about it, i.e., why a limit above zero was considered
necessary or whether zero needs to be a special case.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author