From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5727 invoked from network); 6 Jun 2001 10:46:11 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jun 2001 10:46:11 -0000 Received: (qmail 29225 invoked by alias); 6 Jun 2001 10:45:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14745 Received: (qmail 29200 invoked from network); 6 Jun 2001 10:45:50 -0000 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to lantern@shell10.ba.best.com using -f From: "Bart Schaefer" Message-Id: <1010606104439.ZM1317@candle.brasslantern.com> Date: Wed, 6 Jun 2001 10:44:39 +0000 In-Reply-To: <200106060947.LAA23791@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: autoloading from deleted wordcode digest files" (Jun 6, 11:47am) References: <200106060947.LAA23791@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.dk Subject: Re: autoloading from deleted wordcode digest files MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 6, 11:47am, Sven Wischnowsky wrote: } Subject: Re: autoloading from deleted wordcode digest files } } Clint Adams wrote: } } > I'm making .zwc files using zcompile -U -M. } > zsh will keep these files opened and mmapped even } > after they are deleted, but efforts to autoload } > functions within will fail. } > } > I want the deleted file to be searched if the function } > is not found on disk. I assume that this can be accomplished } > by including the filename in struct funcdump, and using } > that as an identifier should the files be deleted after } > mmapping. } } Somehow I think the OS should ensure that such files can't be deleted } (by renaming them as it does for the .nfs* files or something). The OS does ensure that they're not deleted -- it keeps the inode around but deletes the directory entry, just as for any other open file (cygwin notwithstanding); but autoloading checks for the existence of the file by name before using the already-mapped copy. Clint wants zsh to remember what name it used to map a file and then keep using that mapped copy even after the name has gone away on disk. } Hm, things could break terribly if mapped function files disappear and I } don't see a completely satisfying solution. Searching again for the zwc } file works for functions that haven't been loaded yet, but what about } those that were used already? You have it backwards. Clint wants check_dump_file() to search for a function in the already-mapped files because load_dump_header() fails if it can't do an open(). } > Will this break anything? } } This certainly depends on how you write it ;-) And probably on the way } the system handles all this. The problem I see with it is that it could cause mysterious violations of fpath ordering. I guess it wouldn't be so bad if it were only the fallback case exactly when load_dump_header() can't open(). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net