Displaying 5 results from an estimated 5 matches for "file_stop".
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
...les changed, 12 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 811c28a4..5fd1c7c1 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
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;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
...les changed, 12 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 26055493..e28e56cb 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
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;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...; cp && evalskip == 0 ; cp = cp->nclist.next) {
@@ -459,8 +460,6 @@ evalcase(union node *n, int flags)
}
}
out:
- popstackmark(&smark);
-
return status;
}
@@ -717,7 +716,6 @@ evalcommand(union node *cmd, int flags)
struct localvar_list *localvar_stop;
struct parsefile *file_stop;
struct redirtab *redir_stop;
- struct stackmark smark;
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)...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...cal;
errlinno = lineno = 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->t...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
...status;
@@ -839,9 +840,6 @@ bail:
goto out;
}
- if (likely(vlocal))
- localvar_stop = pushlocalvars();
-
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
struct strlist **spp;
@@ -920,8 +918,7 @@ out:
popredir(execcmd);
unwindredir(redir_stop);
unwindfiles(file_stop);
- if (likely(vlocal))
- unwindlocalvars(localvar_stop);
+ unwindlocalvars(localvar_stop);
if (lastarg)
/* dsl: I think this is intended to be used to support
* '_' in 'vi' command mode during line editing...
diff --git a/usr/dash/var.c b/usr/dash/var.c
index 40743e5d..0d...