Displaying 2 results from an estimated 2 matches for "db7639a4".
Did you mean:
db639a4
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Return without arguments in a trap should use status outside traps
...>
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)
int
retur...
2019 Jan 25
0
[klibc:update-dash] eval: Fix exit status when calling eval/dot with no commands
...bugs lurking.
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 ++-
usr/dash/main.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index db7639a4..ef6ec0ef 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -172,7 +172,8 @@ evalstring(char *s, int flags)
status = 0;
while ((n = parsecmd(0)) != NEOF) {
evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
- status = exitstatus;
+ if (n)
+ status = exitstatus;
popstackmark(&...