From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22922 invoked from network); 15 Oct 2020 15:37:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Oct 2020 15:37:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602776245; b=vTIOV+sWWzj7rdTW0jJhG6t0kS4RQn+efh7h8c71HCc1I9qwcoMpQlmos5EBfOhQiYik/z1Slh JDjrWbPWR3pj+nSLV8dnyt/J8Q90+Y3o+vBWygvFJ7axxkjfUV2PrytB6aXW3EBZHFWh4ntSw5 oJJXICIIWyiciZg3JNO67OCIelK3/x1qsNb1ahl/Ht/HJOku0wpjsDYSuDqse7v7d6f5HxS6lR MO65HepmItMo2yJUMYx7lbpgAvUCeKULoh9SfQqx/VeH4bKT70XP6Nfwb0fobqQE718q1aeBHq PO0eF/QxskUfrT8IaZshyiM0aKWD3v9hLE6ej0yW6S1mHA==; ARC-Authentication-Results: i=1; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1602776245; bh=k9Z+xBicpeoH8J/5aCYGNZkr8hAeSQ59oXsxwU2CqSA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ZPFr5THvcigUKS+r1w1Ns2xWZVKLqL5dxJ3YEAVzT7s08zM7b4fUpvQsd9ukkNK/ozgjbZZv+f 9JETZEyiuKm4ZsVc+D04gXrOsSIs3raTpZ6YWp5B4kpdXdjp3sk/ygrXU/L7Xsmqu1VYx7kbjW ulxYxY/0++NwmDbRbIngSb8gHfVoDOQ7FBMeeoYYDDlQRMu+dH/c6bgxO0XoMiuR71Kjy8XqXq kxSg/fClayUD+Rc4J6tVmVCq/GmRxqv2usocfNj5yC+HmvUfbKV0lPHB7crb2geRotktHZl9p7 vRD5zdmYB4Ws+0/2Zpfva43N0u2YYp2T+P++Fo9WY2qh/w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=k9Z+xBicpeoH8J/5aCYGNZkr8hAeSQ59oXsxwU2CqSA=; b=B7ig1JR2bb8O6xY88W6STfEeLb a+fN/SysnnQuaTcX+W3RFfyHzA+KSe//2fSPNa99kfANciZfSts0herah/OyFrEk8yWdS/JnFAmdu Z3fqyVPEsofA9nTBtVJ3gyY++bFBiP/qEz39NnIVoQ4gKH4NQTNpFLvuZ12kUfzwj/zwGihmClNR3 PNOvUIE8qK2if/SaSND9B8pZXLaSHdOSK4ShuV0Z8n1p+zwzTzYLbW3uJzqapY4NzarhuYxbLrY+F VYSoU0gOEuv6Pe3mQI4TVhCGJltpFSRRWfSxhTQ8/q8D9YhYiaxib69V570dc6YKgdkXyi2yWo1LW Bt12/q0w==; Received: from authenticated user by zero.zsh.org with local id 1kT5Jk-000Ecn-T2; Thu, 15 Oct 2020 15:37:24 +0000 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 Received: from mail-io1-f52.google.com ([209.85.166.52]:46577) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kT5JY-000EUP-MR; Thu, 15 Oct 2020 15:37:14 +0000 Received: by mail-io1-f52.google.com with SMTP id o4so1369971iov.13 for ; Thu, 15 Oct 2020 08:37:12 -0700 (PDT) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k9Z+xBicpeoH8J/5aCYGNZkr8hAeSQ59oXsxwU2CqSA=; b=IheDvxbhu1uwTBq14K19921SkSb2LxrUKXyTKCjoQfKqPqhu429ezBwmWRevqmdk1g Q1RSv2gn8itM5ot4ST2QXiZGheloFCCU2HpUs9RhyRlJcQu4zPcY0LJG69JfgeKBA/vF QfvAGOviRh6HPFMs/bHoPLXtShqd59t0mWo238D2xaHorub0BrcS1i70Mak50vYQDNsx rAXtS5HXppGvXhmWXc+6GyJOiUSTZJKP7UaFWigFTfo6twjOaEfppPjJRUQ85Evi5Pr5 eKlyyanjtnI5+40Cw9wVEFJD9S1Cll3FMNY7zhrfzFAQNUoj7AI/pcEh3pedLwZ/2L+x yDKg== X-Gm-Message-State: AOAM530tlQsSQYcvwTJekgysiDMhR4LQtmRaZPIavRCRC3uX8FBj/qtZ qsakQS034Va6USMK0AvmJVZBMBhuX8f61llA7wY= X-Google-Smtp-Source: ABdhPJxdPVPFVYajaXVjRXAmIumLoVPXOqT/JgvOn0UnlC8gb4il9yyjM+EjWr1GXRFJ/Kgzlpn/7PkIgN5eT0t7vdQ= X-Received: by 2002:a02:c8d1:: with SMTP id q17mr4046243jao.127.1602776231235; Thu, 15 Oct 2020 08:37:11 -0700 (PDT) MIME-Version: 1.0 References: <20201009200737.GA78914@CptOrmolo.darkstar> <20201009205357.GA6449@CptOrmolo.darkstar> In-Reply-To: From: Roman Perepelitsa Date: Thu, 15 Oct 2020 17:36:59 +0200 Message-ID: Subject: Re: [patch] Avoid race in zf_mkdir To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47461 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Thu, Oct 15, 2020 at 5:29 PM Bart Schaefer wrote: > > On Thu, Oct 15, 2020 at 3:02 AM Roman Perepelitsa > 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.