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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3858 invoked from network); 4 Jun 2020 05:07:24 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2020 05:07:24 -0000 Received: (qmail 5019 invoked by alias); 4 Jun 2020 05:07:19 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45962 Received: (qmail 13735 invoked by uid 1010); 4 Jun 2020 05:07:19 -0000 X-Qmail-Scanner-Diagnostics: from mail-oi1-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25828. spamassassin: 3.4.4. Clear:RC:0(209.85.167.170):SA:0(-1.9/5.0):. Processed in 1.409104 secs); 04 Jun 2020 05:07:19 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.170 as permitted sender) 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=l+KOY+P5YHG3gOqiE1DF+FrWDbtqjlBiAqbkc4hUFGc=; b=Z2h/YbNcpyeJ8G6HHdX56XlSwyv/ex6iJ81PGH61Jh/AJkifsN+t9HOIycI6FL28Gg FjDIkRUp0Cpsr1akcBJSspSwU8PA/OKY3V0rf/aY+mONxWA9esVt2j4elikvDSn3YpUT 2Wi/1MAf0YDaa5JFvnvpNOdi8cMHO7Du9tTvMqDWTJAS2JkRWCOaaCTHsbCugQeSnDxm 0yR2Vlwl9JVjJLmNCL0ui3VYuuuA4wGsV7iTPIapLXNPTawbAe5mhfyqTPeCahlv91GW IYLH6AH/cPN1E5CE2sELiaqqAVuzWnTmcA15gOsUN82u1cJP9SdGZISBaEe9FeZ+NeT0 Gozg== X-Gm-Message-State: AOAM5324CO82Cjv6I0ix+sNbxmUg5Qem8pu/TBY4JAn1xb/3iY6ue+5k HRv2fWZ1ZVAX1deq2a+pKFkYGshkBMxZEqwpRhRZaSLIEsk= X-Google-Smtp-Source: ABdhPJyGz7MFIP4wsllW5I81rJDJbInXhncGkQz7btkPWgbPWCoDJ086NJy2NteBt5WmPvzEY38zrEE09d6VsSD6B5s= X-Received: by 2002:aca:57d7:: with SMTP id l206mr1962468oib.84.1591247205420; Wed, 03 Jun 2020 22:06:45 -0700 (PDT) MIME-Version: 1.0 References: <89aed74d-db7b-47ad-b218-8158838049e9@www.fastmail.com> <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> In-Reply-To: <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> From: Bart Schaefer Date: Wed, 3 Jun 2020 22:06:34 -0700 Message-ID: Subject: Re: Any way to allow clobbering empty files when noclobber is set? To: "zsh-workers@zsh.org" Cc: Martin Tournoij Content-Type: text/plain; charset="UTF-8" On Wed, Jun 3, 2020 at 5:05 AM Peter Stephenson wrote: > > Martin Tournoij wrote: > > I rather miss though: the 'notempty' option in 'noclobber'. > > This isn't actually hard to implement. What does everyone else think? Gmail thinks ".dif" is a spreadsheet, and MacOS thinks it's a video. More seriously ... what, if any, effect ought this have on "command >> nonexistent" ? I'm not familiar with the tcsh variation of this. Does it matter if the file is a symlink? Should this be done with open()-then-fstat() as is done for non-regular files instead of stat()-then-open(), to avoid race conditions?