zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@math.gatech.edu
Subject: Re: PATCH: module cleanup
Date: Thu, 17 Dec 1998 13:57:38 +0100	[thread overview]
Message-ID: <9812171257.AA39781@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Thu, 17 Dec 1998 12:00:30 NFT." <199812171100.MAA09011@beta.informatik.hu-berlin.de>

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 <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


      reply	other threads:[~1998-12-17 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-17 11:00 Sven Wischnowsky
1998-12-17 12:57 ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9812171257.AA39781@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).