search for: 57db825b

Displaying 2 results from an estimated 2 matches for "57db825b".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Allow return in loop conditional to set exit status
...tephane_chazelas at yahoo.fr> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index bb106368..57db825b 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -387,8 +387,9 @@ evalloop(union node *n, int flags) status = exitstatus; skip = skiploop(); } while (!(skip & ~SKIPCONT)); + if (skip != SKIPFUNC) + exitstatus = status; loopnest--; - exitstatus = status; }
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Return without arguments in a trap should use status outside traps
...ana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/eval.c | 17 ++++++++++++++--- usr/dash/eval.h | 1 + usr/dash/main.c | 2 +- usr/dash/trap.c | 3 ++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 57db825b..db7639a4 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -967,7 +967,7 @@ funcdone: shellparam = saveparam; handler = savehandler; INTON; - evalskip &= ~SKIPFUNC; + evalskip &= ~(SKIPFUNC | SKIPFUNCDEF); return e; } @@ -1047,12 +1047,23 @@ breakcmd(int argc, char **argv)...