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 12:06:36 +0100	[thread overview]
Message-ID: <25743.1001675196@csr.com> (raw)
In-Reply-To: "Borsenkow Andrej"'s message of "Fri, 28 Sep 2001 14:33:14 +0400." <002701c14808$fafda670$21c9ca95@mow.siemens.ru>

Borsenkow Andrej wrote:
> > +    if (!module_loaded("zsh/net/tcp"))
> > +	return !load_module("zsh/net/tcp");
> 
> 
> require_module does a bit more checking and is using
> queue/unqueue_signals which makes me suspect it is better suited ... (or
> all this checking is redundant?)

You're right, that's the obvious thing to use.  The third argument to
require_module appears not to do anything, however.

One very minor issue with loading a module at that point is that it appears
after the module you're actually requesting (i.e. zsh/zftp) in the list of
modules produced by zmodload, which is slightly illogical.

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 11:01:45
@@ -3099,7 +3099,8 @@
 int
 setup_(Module m)
 {
-    return 0;
+    /* setup_ returns 0 for success. require_module returns 1 for success. */
+    return !require_module("", "zsh/net/tcp", 0, 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 11:07 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
2001-09-28 10:33               ` Borsenkow Andrej
2001-09-28 11:06                 ` Peter Stephenson [this message]
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=25743.1001675196@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).