Zsh Mailing List Archive
Messages sorted by:
Re: Any way to allow clobbering empty files when noclobber is set?
- X-seq: zsh-workers 45999
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Any way to allow clobbering empty files when noclobber is set?
- Date: Sat, 6 Jun 2020 00:04:21 -0700
- Cc: Martin Tournoij <martin@xxxxxxxxxx>
- In-reply-to: <firstname.lastname@example.org>
- 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> <email@example.com> <CAH+w=7a0s5BhBWRHReD1oGkKLkxVt8rs+kZQu9Dg0-efaKuYtg@mail.gmail.com> <firstname.lastname@example.org> <CAH+w=7bwKvJ7F4JCu7CUuTVxivy8OScCFwN97DKnK9M9QXqVSA@mail.gmail.com> <email@example.com> <CAH+w=7b9WP77s5cTBO+gszHS=WJDLXzjjQqvU-E1Jdwz_jRwQw@mail.gmail.com> <firstname.lastname@example.org>
On Fri, Jun 5, 2020 at 9:48 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Bart Schaefer wrote on Fri, 05 Jun 2020 18:07 -0700:
> > - how to identify the file we opened, in case something else renamed
> > or removed it, and created another one of the same name in the
> > meantime
> > That seems at least impractical, especially the last one.
> It'll just be a couple of local variables on the C stack, won't it?
That would only work for jobs that run synchronously. It has to be in
the fdtable or the job table or something for background jobs and
> > Open could fail because of file permissions. Unlink depends only on
> > directory permissions.
> Well, yes, but usually, if you don't have permission to read a file,
> in practice you won't have permission to delete it either.
I think you mean "write" there, but actually you might be able to
write to an empty file that you can't delete, but not create a file
that you can't delete.
Messages sorted by: