Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [patch] Avoid race in zf_mkdir
- X-seq: zsh-workers 47461
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: [patch] Avoid race in zf_mkdir
- Date: Thu, 15 Oct 2020 17:36:59 +0200
- Archived-at: <https://zsh.org/workers/47461>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/CAN%3D4vMqxasXspkeObObB0tgwnEidSkL8oJPeU_uMaS2kwUdKig%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-io1-f52.google.com) smtp.remote-ip=209.85.166.52; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k9Z+xBicpeoH8J/5aCYGNZkr8hAeSQ59oXsxwU2CqSA=; b=ovM4mHNeReVlnf8cuFpQ1jXhwZ+YYi11nrcfMAcP9FgobsnpvxEn98qlcW0wbAAzQ4 VvZRfeG7OpjVGA49iEF7zmebPrRSjcnP2BXog13qoDfYXKw6PNy4PtTOpQfXnEC/+TKf xAd7NGN2gVWup5fBo52KMBTFZuYL3w3y0HW2vE2tCdR10ZxWBz5TgJf8d5NB/DnCcmZi n1wOKTzgETn7BhGOVYc+tTZ5MaQ6y9fKBqlOrRPUe+6VPUXleqxcpZ1LhSTnrOCymo1q uyfrOc0WWUAeVwb2xgkTUVjQ4+QR6rbHxrOPHi9fyoXZ9U8m04qGeUlx6mpQ+3Cyw7PV UMEw==
- In-reply-to: <CAH+w=7ZWYjRC8TX0-BekfW932pw_P15YSad03SJaHL8=3-S+zA@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <20201009200737.GA78914@CptOrmolo.darkstar> <CAH+w=7anY9r+-MYki4cycVuaP2+d9L3W5u8k3sHyZx4R5kvafg@mail.gmail.com> <CAN=4vMoJrD+g4Go37yT6gF-Lx61vHm45GvmG1Fx6-+3yyb1hAQ@mail.gmail.com> <CAH+w=7ZRvW3Yq3XO6TwbK1hgSDNE8ynX0eQOU2dTuLcAELNUDg@mail.gmail.com> <20201009205357.GA6449@CptOrmolo.darkstar> <CAN=4vMqJ8SXkz_EVqwL7-9gCQYg9GMczOztAtsErirXGEDRq8Q@mail.gmail.com> <CAH+w=7ZfkwJY6a1LzR3n=LsOmB21WKUZMXfNzXN1hNDFpdeG2w@mail.gmail.com> <CAN=4vMpuSaF6BDhhUP=tnvDDMTN=iKExkmtb5QgtoeCqN_9D3g@mail.gmail.com> <CAN=4vMqihCrowyGTxKhkdzOQq3GcmWes3fuzYXJ1DBN9WsLnmA@mail.gmail.com> <CAH+w=7ZWYjRC8TX0-BekfW932pw_P15YSad03SJaHL8=3-S+zA@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
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