zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Core dump unloading zsh/zftp
Date: Fri, 28 Sep 2001 11:22:41 +0100	[thread overview]
Message-ID: <22087.1001672561@csr.com> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Fri, 28 Sep 2001 10:04:05 -0000." <1010928100405.ZM16401@candle.brasslantern.com>

Bart Schaefer wrote:
> Running:
>     zmodload zsh/zftp
>     zmodload -u zsh/zftp

It crashes when you exit the shell, too, if you have zsh/zftp loaded.

> It appears that the zfsessions linklist is not empty, even though there
> is no valid session in it anywhere.

See boot_ -- you always get a `default' session.

It way well be related to the stuff I posted yesterday about TCP session
management: deciding what zfclose() should actually be doing was one of the
big problems.  The interface between the zftp and tcp modules is still a
bit tricky.

Here's the patch to make zftp load tcp.  This handles the dependency
transparently with a working RTLD_LAZY, which seems fine with Solaris.
It should be pretty easy to convert dependency lists into code like this.

The only fly in the ointment I can see is with multiple dependencies: if we
load module A, then fail to load module B, we should unload A if it wasn't
already loaded.  Hence we should probably write a function for module.c
which is passed the list of dependency modules and handles loading in this
way.

It doesn't unload tcp automatically, though.  I don't know how to do that,
given that tcp may meanwhile be used for other things meanwhile.  In
particular, it links in a builtin, at which point we can't really tell
who's doing what.

Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.19
diff -u -r1.19 zftp.c
--- Src/Modules/zftp.c	2001/09/08 21:09:56	1.19
+++ Src/Modules/zftp.c	2001/09/28 10:12:39
@@ -3099,6 +3099,10 @@
 int
 setup_(Module m)
 {
+    /* setup_ returns 0 for success. load_module returns 1 for success. */
+    if (!module_loaded("zsh/net/tcp"))
+	return !load_module("zsh/net/tcp");
+
     return 0;
 }
 
-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


  reply	other threads:[~2001-09-28 10:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27 12:39 4.1.0-dev-2 Peter Stephenson
2001-09-27 14:20 ` Failure of Test/V01 in 4.1.0-dev-2 Geoff Wing
2001-09-27 15:07   ` Bart Schaefer
2001-09-27 15:43     ` Bart Schaefer
2001-09-28  6:33       ` Borsenkow Andrej
2001-09-28  9:57         ` PATCH: " Bart Schaefer
2001-09-28 10:04           ` Core dump unloading zsh/zftp Bart Schaefer
2001-09-28 10:22             ` Peter Stephenson [this message]
2001-09-28 10:33               ` Borsenkow Andrej
2001-09-28 11:06                 ` Peter Stephenson
2001-09-28 11:15                   ` Borsenkow Andrej

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=22087.1001672561@csr.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /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).