Zsh Mailing List Archive
Messages sorted by:
Re: Any way to allow clobbering empty files when noclobber is set?
- X-seq: zsh-workers 45970
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Any way to allow clobbering empty files when noclobber is set?
- Date: Thu, 4 Jun 2020 13:26:48 +0100 (BST)
- Cc: Martin Tournoij <martin@xxxxxxxxxx>
- Importance: Medium
- In-reply-to: <CAN=4vMq0iRVjcSDOTSc-tzqK1Uq1X3pa83s9ZT=1auZBxfXxkw@mail.gmail.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20200603020919eucas1p13e26ebcbb335784d14bfb97b137f385a@eucas1p1.samsung.com> <firstname.lastname@example.org> <94e73ebcf39d4d3f9c7ae257b1d75d16@CAMSVWEXC01.scsc.local> <CAH+w=7YpQ3CcsMhAvztGHx19FnALBV349RAz4p8iuB+_8AnsxQ@mail.gmail.com> <email@example.com> <CAN=4vMq0iRVjcSDOTSc-tzqK1Uq1X3pa83s9ZT=1auZBxfXxkw@mail.gmail.com>
> On 04 June 2020 at 13:20 Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
> On Thu, Jun 4, 2020 at 11:43 AM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> 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.
Messages sorted by: