zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Static zsh aborts a function when zmodload is failed.
Date: Fri, 14 Jan 2000 09:32:54 +0100 (MET)	[thread overview]
Message-ID: <200001140832.JAA11019@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 14 Jan 2000 08:41:17 +0900


Tanaka Akira wrote:

> Static version of zsh aborts a function when zmodload is failed as:
> 
> Z(2):akr@is27e1u11% ./configure --prefix=/space/akr/zsh/zz --disable-dynamic&& make && make install
> ...
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% tst () { print A; zmodload xxx; print B }
> is27e1u11% tst
> A
> tst: failed to load module: xxx
> is27e1u11% 
> 
> I think zsh should prints `B' as follows:
> 
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% tst () { print A; zmodload xxx; print B }
> is27e1u11% tst
> A
> tst: failed to load module: xxx
> B
> is27e1u11% 
> 
> Dynamic version works well.

errflag wasn't restored in the static version of do_load_module().

Bye
 Sven

diff -ru ../z.old/Src/module.c Src/module.c
--- ../z.old/Src/module.c	Fri Jan 14 09:26:46 2000
+++ Src/module.c	Fri Jan 14 09:27:47 2000
@@ -424,7 +424,10 @@
 static void *
 do_load_module(char const *name)
 {
+    int waserr = errflag;
+
     zerr("failed to load module: %s", name, 0);
+    errflag = waserr;
 
     return NULL;
 }

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-01-14  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-14  8:32 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-01-13 23:41 Tanaka Akira

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=200001140832.JAA11019@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).