zsh-workers
 help / color / mirror / code / Atom feed
* Re: Static zsh aborts a function when zmodload is failed.
@ 2000-01-14  8:32 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-01-14  8:32 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Static zsh aborts a function when zmodload is failed.
@ 2000-01-13 23:41 Tanaka Akira
  0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-01-13 23:41 UTC (permalink / raw)
  To: zsh-workers

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.
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-01-14  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-14  8:32 Static zsh aborts a function when zmodload is failed Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-01-13 23:41 Tanaka Akira

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).