diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 17:03:31 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 17:03:31 +0000 |
commit | d7e3ef40ec5b99676d7f33f501c8f3b59446a938 (patch) | |
tree | 8a2c546b09e1ca36958d51be4c5a405a2eeb77c1 /Src | |
parent | 1dbb0b4247592c0bd4d135693e86c3a20b823037 (diff) | |
download | zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.gz zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.tar.xz zsh-d7e3ef40ec5b99676d7f33f501c8f3b59446a938.zip |
zsh-workers/10120
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 3 | ||||
-rw-r--r-- | Src/loop.c | 2 | ||||
-rw-r--r-- | Src/parse.c | 7 |
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); |