search for: back_exitstatus

Displaying 6 results from an estimated 6 matches for "back_exitstatus".

2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Exit without arguments in a trap should use status outside traps
...diff --git a/usr/dash/eval.c b/usr/dash/eval.c index b384cb82..ccd5e0c0 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -74,6 +74,7 @@ static int funcline; /* starting line number of current function, or 0 if not i char *commandname; int exitstatus; /* exit status of last command */ int back_exitstatus; /* exit status of backquoted command */ +int savestatus = -1; /* exit status of last command outside traps */ #if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3) @@ -114,6 +115,10 @@ INCLUDE "eval.h" RESET { evalskip = 0; loopnest = 0; + if (savestatus...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Exit without arguments in a trap should use status outside traps
...diff --git a/usr/dash/eval.c b/usr/dash/eval.c index 3e08e825..1c76d4c5 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -74,6 +74,7 @@ static int funcline; /* starting line number of current function, or 0 if not i char *commandname; int exitstatus; /* exit status of last command */ int back_exitstatus; /* exit status of backquoted command */ +int savestatus = -1; /* exit status of last command outside traps */ #if !defined(__alpha__) || (defined(__GNUC__) && __GNUC__ >= 3) @@ -114,6 +115,10 @@ INCLUDE "eval.h" RESET { evalskip = 0; loopnest = 0; + if (savestatus...
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
...struct redirtab *redir_stop; struct stackmark smark; union node *argp; @@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags) TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); setstackmark(&smark); localvar_stop = pushlocalvars(); + file_stop = parsefile; back_exitstatus = 0; cmdentry.cmdtype = CMDBUILTIN; @@ -896,6 +898,7 @@ out: if (cmd->ncmd.redirect) popredir(execcmd); unwindredir(redir_stop); + unwindfiles(file_stop); unwindlocalvars(localvar_stop); if (lastarg) /* dsl: I think this is intended to be used to support diff --git a/usr/dash/i...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
...struct redirtab *redir_stop; struct stackmark smark; union node *argp; @@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags) TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); setstackmark(&smark); localvar_stop = pushlocalvars(); + file_stop = parsefile; back_exitstatus = 0; cmdentry.cmdtype = CMDBUILTIN; @@ -896,6 +898,7 @@ out: if (cmd->ncmd.redirect) popredir(execcmd); unwindredir(redir_stop); + unwindfiles(file_stop); unwindlocalvars(localvar_stop); if (lastarg) /* dsl: I think this is intended to be used to support diff --git a/usr/dash/i...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...union node *argp; struct arglist arglist; struct arglist varlist; @@ -746,7 +744,6 @@ evalcommand(union node *cmd, int flags) /* First expand the arguments. */ TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); - setstackmark(&smark); file_stop = parsefile; back_exitstatus = 0; @@ -925,7 +922,6 @@ out: * However I implemented that within libedit itself. */ setvar("_", lastarg, 0); - popstackmark(&smark); return status; }
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...o = cmd->ncmd.linno; if (funcline) @@ -745,7 +747,6 @@ evalcommand(union node *cmd, int flags) /* First expand the arguments. */ TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); setstackmark(&smark); - localvar_stop = pushlocalvars(); file_stop = parsefile; back_exitstatus = 0; @@ -759,6 +760,8 @@ evalcommand(union node *cmd, int flags) cmd_flag = 0; execcmd = 0; spclbltin = -1; + vflags = 0; + vlocal = 0; path = NULL; argc = 0; @@ -770,6 +773,8 @@ evalcommand(union node *cmd, int flags) find_command(arglist.list->text, &cmdentry, c...