Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: check deleted .zwc files
- X-seq: zsh-workers 14818
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: check deleted .zwc files
- Date: Fri, 8 Jun 2001 15:53:09 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <010608124608.ZM5942@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Fri, Jun 08, 2001 at 12:46:08PM -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010608141719.A4626@xxxxxxxx> <010608115028.ZM5876@xxxxxxxxxxxxxxxxxxxxxxx> <20010608150445.A5394@xxxxxxxx> <010608124608.ZM5942@xxxxxxxxxxxxxxxxxxxxxxx>
> I have a .zwc file for several functions. I update one of those functions.
> I then remove and rebuild the .zwc file. Now, stat() of the .zwc shows
> that it is newer than the function file, but any running zsh still has a
> mapped descriptor on the removed file. With this code:
> > if (stat(filename, buf)) {
[...]
> zwcstat() will cause zsh to decide that it can keep using the mapped copy,
> even though the function file is actually newer than the mapped copy.
Maybe I'm confused. If you've generated a new .zwc file, that stat()
will return 0, and the mapped copy won't even be considered.
> The only safe thing to do is to try the fstat() first, then stat(). To be
> really complete, if fstat() and stat() disagree zsh should throw out the
> mapped file and reload it, but that could get pretty tricky.
Too tricky for me.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author