diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-08-06 15:45:37 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-08-06 15:45:37 +0000 |
commit | d026334a3b25a2150d59a3f53a20d39ddb96ab56 (patch) | |
tree | 68c3984835959b03d9b9f09d37951af40edc47da | |
parent | b36d4eec0b6016d5968885d71034df51bce491e8 (diff) | |
download | zsh-d026334a3b25a2150d59a3f53a20d39ddb96ab56.tar.gz zsh-d026334a3b25a2150d59a3f53a20d39ddb96ab56.tar.xz zsh-d026334a3b25a2150d59a3f53a20d39ddb96ab56.zip |
25405: return status from anonymous functions was not handled
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/exec.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 82c87fe19..71929d01f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-08-06 Peter Stephenson <pws@csr.com> + * 25405: Src/exec.c: return value was not set from anonymous + functions. + * 25400: Test/C03traps.ztst: Rocky's test for 25385 2008-08-05 Peter Stephenson <pws@csr.com> diff --git a/Src/exec.c b/Src/exec.c index daa7ba55c..5b360815f 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3870,7 +3870,7 @@ execfuncdef(Estate state, UNUSED(int do_exec)) { Shfunc shf; char *s = NULL; - int signum, nprg, sbeg, nstrs, npats, len, plen, i, htok = 0; + int signum, nprg, sbeg, nstrs, npats, len, plen, i, htok = 0, ret = 0; Wordcode beg = state->pc, end; Eprog prog; Patprog *pp; @@ -3941,6 +3941,7 @@ execfuncdef(Estate state, UNUSED(int do_exec)) addlinknode(args, shf->node.nam); execshfunc(shf, args); + ret = lastval; break; } else { /* is this shell function a signal trap? */ @@ -3963,7 +3964,7 @@ execfuncdef(Estate state, UNUSED(int do_exec)) } } state->pc = end; - return 0; + return ret; } /* Main entry point to execute a shell function. */ |