Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Core dump unloading zsh/zftp
- X-seq: zsh-workers 15893
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Core dump unloading zsh/zftp
- Date: Fri, 28 Sep 2001 12:06:36 +0100
- In-reply-to: "Borsenkow Andrej"'s message of "Fri, 28 Sep 2001 14:33:14 +0400." <002701c14808$fafda670$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author