From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2188 invoked from network); 17 Dec 1998 13:22:38 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Dec 1998 13:22:38 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id IAA03246; Thu, 17 Dec 1998 08:14:33 -0500 (EST) Resent-Date: Thu, 17 Dec 1998 08:14:33 -0500 (EST) Message-Id: <9812171257.AA39781@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu Subject: Re: PATCH: module cleanup In-Reply-To: "Sven Wischnowsky"'s message of "Thu, 17 Dec 1998 12:00:30 NFT." <199812171100.MAA09011@beta.informatik.hu-berlin.de> Date: Thu, 17 Dec 1998 13:57:38 +0100 From: Peter Stephenson Resent-Message-ID: <"esNHC.0.co.uEGUs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4834 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Sven Wischnowsky wrote: > And I have a question: the cleanup/finish functions are currently > *not* called for linked-in modules and for loaded builtins if the > shell is exited without first unloading the modules. Now, if someone > writes a module that really needs to cleanup things (e.g. it has some > kind of write-cache without write-through) this will fail utterly. > Shouldn't we ensure that these functions are always called? Or was > there some reason not to do it? I would guess it was only because to begin with the only job there was to remove builtins from the table and things like that, so there was no point. If they are going to do weird things, it would be sensible to call those. On the other hand, I don't know if it's necessarily a good thing to call both cleanup and finish on every exit. For example, zftp tries to do a clean `quit' on an existing connection when it gets unloaded. This could be potentially hang the shell exiting. We could arrange that one of setup and finish always gets called, which would presumably have to be the first of the two. But none of this is entirely clear to me. It's certainly neatest to call the lot on any exit. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy