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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22078 invoked from network); 15 Oct 2020 15:29:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Oct 2020 15:29:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1602775777; b=z72HxuXNguooz/o9j1vTuoG2jHFJZOk/Da/hoFfs9544drOI+TQ0DoTdsT8ltmpeBEwEhGIiWf hByr2xyeiu7paZABCvSKPqMb7Ao2VwfbyEdtbaAbXCd2kItVuvC1y0ZShtjPT5yOG/+pu19nq9 ZShT8//1y9MpWTynd+6XqO61GVJ6B5kNCYnVq6GIwBxhXTjYuvdNdiGQHKbm0aOquyd4sJhneB fdzrF3g8qtaic9M376ImZn02qiCWMVrYYxdIAkTNfZ0V40ZJJIfYuc8wqTc3cwZQmuEa5H+t/Z DZ8BkuNHjOgAqPzOkVJ3/6z1vekT8dhJXSBJV3agydBXgw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1602775777; bh=WHGbAhMs9khwTCc5F1T3/9QfBQgeFLXoXP/qoEoqGgg=; 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=ItMZx/wTUDzTsYPRz1O4JlsBvxOyDgMGaNY5nP5wzPTwgY+DEH1eovNbBQnijSR6rjuutWkMMu ow6c5rvr9aRpYpgU/Tb2XMQbSTSnYGeYiRcJ03b+ewrBDyFohSdCl17OI33qXVeNbFViDYouwG cFd3hu7wIXErMjAVkdafPods+M5hOz7TEQMPNrdLS37UNGQ6oa8Zc1RvU+h9GTnrkUVXuF0WtX 4Er5NrJqlvT52x0f/jxgS9NIHFe5rKykvursg1qLWOZ/VJ0AbFFqdXXp0LxjmPeZD/lmZ6edDz 8xu6LiS5rXpfNuE41okajE135KOzNJTNWSQMMms9wqRkmw==; 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=WHGbAhMs9khwTCc5F1T3/9QfBQgeFLXoXP/qoEoqGgg=; b=E3O+YKoPdBgUYdS3Nj1fsbbZZK ipNM2f3Hi5JcnMd5MQ/SPjx/jsSijTBVwddPrSuxWlfuBbRkELmm/il3v1asHty/MO+dbD95vwPpN xokH5zx/AdvKpLrdk9eMgRxVqspdPOS6eHt+NHeQzQEwOQHZV/D9RnfGnEwn7RkhtwFZL+KtcvXwA W/MTVtYma55dhi8dHSHR9iyUT8APzkUe0sj9tXaMhFzdhrfMVrjc1Np3JJHc1qsisS5R/ZsSAM4Nn pcO+zHax6wW50WU1O+UlwHiotkLVmRu6jhbJfv0EY1dTPO6Grw3kcbMN7HZ82WSX3JLXa7yGniHpU /SyKYiaQ==; Received: from authenticated user by zero.zsh.org with local id 1kT5C6-000EAU-P7; Thu, 15 Oct 2020 15:29:30 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f176.google.com ([209.85.167.176]:46348) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kT5Br-000E2L-1Y; Thu, 15 Oct 2020 15:29:16 +0000 Received: by mail-oi1-f176.google.com with SMTP id s81so3472849oie.13 for ; Thu, 15 Oct 2020 08:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WHGbAhMs9khwTCc5F1T3/9QfBQgeFLXoXP/qoEoqGgg=; b=c0tAAO5nokdQG4jV3FIJBTTJLvGgtxLCETAOQX8H0ehlwqKWbJofDUf+yqSCoAQ/p7 pp6JgiDUVx9Nw5e8xuS4dFhgGAg93lqk1oIdieqpUoih3ep3L5aIwSBuf5siIudMvbzF qXBPkX7pU2LjfK1enzk7BDjfuFjA2MXcBA4SBipFmUxm922GWiRgX5ZBxmfgsnt6hApB h3xFSX8ZGr6wXipy/ZexPEfTRKvUmETPzgheh0aKeX6DyWTsa/Df35jlrXEdLrV+5ZKW dWSM3vMzRk6GOHE/TjR8GYQ6idZVtFUkIWiFpwfU5E/lEg8bPFDlW5yTXfkijPDFLn1k Cy+g== 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=WHGbAhMs9khwTCc5F1T3/9QfBQgeFLXoXP/qoEoqGgg=; b=c1sSbSRbrLfkX66oXf+4ybFYpkidalwmJad/BUPDVWehYe29x6U8oXTD6eBjipZoSr ONSp/T94K9o0HSSjBWr63drI4FEgK+/iwVtzALvNFxdY4a2SVH+dI/j55n2MSUKOmBqF CDmYCwFwv2gKxEMoM2PezEgfcFHPRq8gevIkJ2eXNBRkqfKVWijailqbaar0EdcscsyG /ssc6JlSyfX9C72ZeutEV+0i/0qGp7gshu8jCaSTc0l2ohyAjxsHDKZfEFIl9UEdsnuF PwBjmPbgxVKhXs7TZEdzXzylO0wW5UuqENup/1EmgVaHKKvR8CAO2KQWCNQsZBYCZ5En aj6w== X-Gm-Message-State: AOAM533g5vpjouqiwqn4UUwwO+PQWOUhB2+RSzEn0XOJBehHAVV9sp0g BdtcmVY6y9OBLaO8YznGGTiuPm0t/Vc7M42R9imot3ovrd+NeA== X-Google-Smtp-Source: ABdhPJz1KhTsEZGUNXidi349q1zRyH/HM+E+0w5yDNV1RlfFX/ICxe+nlaSAxFVQFPMjde+f4WtL8TOa7I4kJUeVxoM= X-Received: by 2002:aca:f54e:: with SMTP id t75mr2372364oih.84.1602775753718; Thu, 15 Oct 2020 08:29:13 -0700 (PDT) MIME-Version: 1.0 References: <20201009200737.GA78914@CptOrmolo.darkstar> <20201009205357.GA6449@CptOrmolo.darkstar> In-Reply-To: From: Bart Schaefer Date: Thu, 15 Oct 2020 08:29:02 -0700 Message-ID: Subject: Re: [patch] Avoid race in zf_mkdir To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47460 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 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. Minor nits about the patch: - zsh coding style prefers a space between keywords such as if/while, and the open paren. - I'm paranoid about tests like "while (n--)", I prefer "while (n-- > 0)".