From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24933 invoked from network); 14 Jan 2000 08:33:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jan 2000 08:33:53 -0000 Received: (qmail 1234 invoked by alias); 14 Jan 2000 08:33:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9315 Received: (qmail 1177 invoked from network); 14 Jan 2000 08:33:41 -0000 Date: Fri, 14 Jan 2000 09:32:54 +0100 (MET) Message-Id: <200001140832.JAA11019@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 14 Jan 2000 08:41:17 +0900 Subject: Re: Static zsh aborts a function when zmodload is failed. 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