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 16111 invoked from network); 4 Jun 2020 12:27:35 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2020 12:27:35 -0000 Received: (qmail 8248 invoked by alias); 4 Jun 2020 12:27:24 -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: 45970 Received: (qmail 16542 invoked by uid 1010); 4 Jun 2020 12:27:24 -0000 X-Qmail-Scanner-Diagnostics: from smtpq2.tb.ukmail.iss.as9143.net 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(212.54.57.97):SA:0(-2.7/5.0):. Processed in 2.281818 secs); 04 Jun 2020 12:27:24 -0000 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _mailcloud.virginmedia.com designates 212.54.57.97 as permitted sender) X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.136 X-CNFS-Analysis: v=2.3 cv=T8IXs8CQ c=1 sm=1 tr=0 a=4AIt8OzuWET5BS7mAkvERw==:117 a=KEnZaF_ea6UA:10 a=IkcTkHD0fZMA:10 a=DoY9bV0jb9AA:10 a=pGLkceISAAAA:8 a=NLZqzBF-AAAA:8 a=RzJxvnyvzPsvJiZRu0MA:9 a=QEXdDO2ut3YA:10 a=wW_WBVUImv98JQXhvVPZ:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com Date: Thu, 4 Jun 2020 13:26:48 +0100 (BST) From: Peter Stephenson To: Zsh hackers list Cc: Martin Tournoij Message-ID: <217711433.430038.1591273608743@mail2.virginmedia.com> In-Reply-To: References: <89aed74d-db7b-47ad-b218-8158838049e9@www.fastmail.com> <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> <483300941.422089.1591263753638@mail2.virginmedia.com> Subject: Re: Any way to allow clobbering empty files when noclobber is set? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev70 X-Originating-IP: 165.225.81.56 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4wfEM+7Ly2XiLngQrxk9e59EDbl+5xiQMXmmeiqf5JbrKYSGWWYOZ6pq4nloOSYnPjv4OAlq3steQ1zvhEJ927FKhFArM9/vz+IYXEZ76oYuye6wLHscLH dmbfNo7OCRL6LWjm5174J/wCG15KONCfzEfYRlvlj+ye+XgxbWjVtgJjoyefaF3z4/iNQslWQfvugnk/E1f206CN+Yx4W9D+uvkOGWfW1x1Tiq9y401x1UP8 > On 04 June 2020 at 13:20 Roman Perepelitsa wrote: > On Thu, Jun 4, 2020 at 11:43 AM Peter Stephenson > wrote: > > At the least we'd need to open the existing file without > > truncating (then either close it or leave it open for writing > > if it was already empty). > > If you mean opening the file with O_APPEND, this could result in > unexpected file content. > > I should also note that the existing no_clobber option can be used to > implement file locks. > > Regardless of what gets decided w.r.t. no-clobber extensions, I hope > this would keep working. Indeed, this is the sort of thing backing up my thinking that we keep the clobbering open function call exactly as it now is if we add the extension for empty files. pws