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

Re: [patch] Avoid race in zf_mkdir



On Thu, Oct 15, 2020 at 5:29 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Oct 15, 2020 at 3:02 AM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > Does anyone have an opinion on the value of N? My latest patch sets
> > N=8 but N=1 would be fine in practice, too.
>
> Any value > 1 would probably render the chances of an incorrect result
> astronomically small.

Thanks for taking a look. You aren't opposed to N=8, right? I slightly
prefer N > 1 and 8 is the largest round number expressible with a
single character, so :-)

> Minor nits about the patch:
> - zsh coding style prefers a space between keywords such as if/while,
> and the open paren.

I'm following the local style of the file I'm changing:
https://github.com/zsh-users/zsh/blob/master/Src/Modules/files.c

Should I go with the project style in my diff? It would make
formatting within the file inconsistent.

> - I'm paranoid about tests like "while (n--)", I prefer "while (n-- > 0)".

Changed. (Not publishing the new patch yet. Will do so once this
discussion concludes.)

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author