summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-13 17:03:31 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-13 17:03:31 +0000
commitd7e3ef40ec5b99676d7f33f501c8f3b59446a938 (patch)
tree8a2c546b09e1ca36958d51be4c5a405a2eeb77c1
parentzsh-workers/10117 (diff)
downloadzsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.gz
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.bz2
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.lz
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.xz
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.zst
zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.zip
zsh-workers/10120
-rw-r--r--Src/exec.c3
-rw-r--r--Src/loop.c2
-rw-r--r--Src/parse.c7
3 files changed, 10 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index d6715a328..336983e46 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -735,6 +735,9 @@ execsimple(Estate state)
{
wordcode code = *state->pc++;
+ if (errflag)
+ return (lastval = 1);
+
if (code)
lineno = code - 1;
diff --git a/Src/loop.c b/Src/loop.c
index b1edb22c4..668f47b97 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -171,6 +171,7 @@ execfor(Estate state, int do_exec)
popheap();
cmdpop();
loops--;
+ state->pc = end;
return lastval;
}
@@ -394,6 +395,7 @@ execwhile(Estate state, int do_exec)
cmdpop();
popheap();
loops--;
+ state->pc = end;
return lastval;
}
diff --git a/Src/parse.c b/Src/parse.c
index d8028f296..373e35ab9 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2404,6 +2404,7 @@ build_dump(char *nam, char *dump, char **files, int ali, int map)
close(dfd);
zerrnam(nam, "can't open file: %s", *files, 0);
noaliases = ona;
+ unlink(dump);
return 1;
}
file = (char *) zalloc(flen + 1);
@@ -2415,17 +2416,19 @@ build_dump(char *nam, char *dump, char **files, int ali, int map)
zfree(file, flen);
zerrnam(nam, "can't read file: %s", *files, 0);
noaliases = ona;
+ unlink(dump);
return 1;
}
close(fd);
file = metafy(file, flen, META_REALLOC);
if (!(prog = parse_string(file, 1)) || errflag) {
+ errflag = 0;
close(dfd);
zfree(file, flen);
- zerrnam(nam, "can't read file: %s", *files, 0);
+ zwarnnam(nam, "can't read file: %s", *files, 0);
noaliases = ona;
- errflag = 0;
+ unlink(dump);
return 1;
}
zfree(file, flen);