Displaying 10 results from an estimated 10 matches for "vexport".
Did you mean:
export
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...spclbltin ^ BUILTIN_SPECIAL;
}
execcmd = cmdentry.u.cmd == EXECCMD;
if (likely(cmdentry.u.cmd != COMMANDCMD))
@@ -798,6 +804,9 @@ evalcommand(union node *cmd, int flags)
for (sp = arglist.list; sp; sp = sp->next)
argc++;
+
+ if (execcmd && argc > 1)
+ vflags = VEXPORT;
}
/* Reserve one extra spot at the front for shellexec. */
@@ -818,7 +827,8 @@ evalcommand(union node *cmd, int flags)
redir_stop = pushredir(cmd->ncmd.redirect);
status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
- if (status) {
+ if (unlikely(status)) {
+ vlo...
2019 Jan 25
0
[klibc:update-dash] jobs - Do not block when waiting on SIGCHLD
...++ b/usr/dash/eval.c
@@ -859,10 +859,8 @@ bail:
if (!(flags & EV_EXIT) || have_traps()) {
INTOFF;
jp = makejob(cmd, 1);
- if (forkshell(jp, cmd, FORK_FG) != 0) {
- INTON;
+ if (forkshell(jp, cmd, FORK_FG) != 0)
break;
- }
FORCEINTON;
}
listsetvar(varlist.list, VEXPORT|VSTACK);
@@ -875,11 +873,8 @@ bail:
if (execcmd && argc > 1)
listsetvar(varlist.list, VEXPORT);
}
- if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- if (exception == EXERROR && spclbltin <= 0) {
- FORCEINTON;
- break;
- }
+ if (evalbltin(cmdentry.u...
2020 Mar 28
0
[klibc:update-dash] dash: jobs - Do not block when waiting on SIGCHLD
...++ b/usr/dash/eval.c
@@ -859,10 +859,8 @@ bail:
if (!(flags & EV_EXIT) || have_traps()) {
INTOFF;
jp = makejob(cmd, 1);
- if (forkshell(jp, cmd, FORK_FG) != 0) {
- INTON;
+ if (forkshell(jp, cmd, FORK_FG) != 0)
break;
- }
FORCEINTON;
}
listsetvar(varlist.list, VEXPORT|VSTACK);
@@ -875,11 +873,8 @@ bail:
if (execcmd && argc > 1)
listsetvar(varlist.list, VEXPORT);
}
- if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- if (exception == EXERROR && spclbltin <= 0) {
- FORCEINTON;
- break;
- }
+ if (evalbltin(cmdentry.u...
2019 Jan 25
0
[klibc:update-dash] [ERROR] Set exitstatus in onint
...signal(SIGINT, SIG_DFL);
raise(SIGINT);
}
+ exitstatus = SIGINT + 128;
exraise(EXINT);
/* NOTREACHED */
}
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 741bf120..501d47fe 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -853,21 +853,15 @@ bail:
listsetvar(varlist.list, VEXPORT);
}
if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- int status;
- int i;
-
- i = exception;
- if (i == EXEXIT)
- goto raise;
-
- status = (i == EXINT) ? SIGINT + 128 : 2;
- exitstatus = status;
-
- if (i == EXINT || spclbltin > 0) {
-raise:
- longjmp(handler->l...
2019 Jan 25
0
[klibc:update-dash] [EVAL] Do not clobber exitstatus in evalcommand
...gs <ben at decadent.org.uk>
---
usr/dash/eval.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 501d47fe..b384cb82 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -853,12 +853,9 @@ bail:
listsetvar(varlist.list, VEXPORT);
}
if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- if (exception == EXERROR) {
- exitstatus = 2;
- if (spclbltin <= 0) {
- FORCEINTON;
- break;
- }
+ if (exception == EXERROR && spclbltin <= 0) {
+ FORCEINTON;
+ break;
}
raise:
longjmp(...
2020 Mar 28
0
[klibc:update-dash] dash: [ERROR] Set exitstatus in onint
...signal(SIGINT, SIG_DFL);
raise(SIGINT);
}
+ exitstatus = SIGINT + 128;
exraise(EXINT);
/* NOTREACHED */
}
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 578d8919..b3e971bf 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -853,21 +853,15 @@ bail:
listsetvar(varlist.list, VEXPORT);
}
if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- int status;
- int i;
-
- i = exception;
- if (i == EXEXIT)
- goto raise;
-
- status = (i == EXINT) ? SIGINT + 128 : 2;
- exitstatus = status;
-
- if (i == EXINT || spclbltin > 0) {
-raise:
- longjmp(handler->l...
2020 Mar 28
0
[klibc:update-dash] dash: [EVAL] Do not clobber exitstatus in evalcommand
...gs <ben at decadent.org.uk>
---
usr/dash/eval.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index b3e971bf..3e08e825 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -853,12 +853,9 @@ bail:
listsetvar(varlist.list, VEXPORT);
}
if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
- if (exception == EXERROR) {
- exitstatus = 2;
- if (spclbltin <= 0) {
- FORCEINTON;
- break;
- }
+ if (exception == EXERROR && spclbltin <= 0) {
+ FORCEINTON;
+ break;
}
raise:
longjmp(...
2012 Jul 02
0
[klibc:master] [VAR] Sanitise environment variable names on entry
.../dash/var.c
index 027beff..dc90249 100644
--- a/usr/dash/var.c
+++ b/usr/dash/var.c
@@ -136,7 +136,8 @@ INIT {
initvar();
for (envp = environ ; *envp ; envp++) {
- if (strchr(*envp, '=')) {
+ p = endofname(*envp);
+ if (p != *envp && *p == '=') {
setvareq(*envp, VEXPORT|VTEXTFIXED);
}
}
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
.../var.c | 12 +++++++++---
usr/dash/var.h | 2 +-
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 7bb636e1..6652ccc0 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -809,6 +809,8 @@ evalcommand(union node *cmd, int flags)
vflags = VEXPORT;
}
+ localvar_stop = pushlocalvars(vlocal);
+
/* Reserve one extra spot at the front for shellexec. */
nargv = stalloc(sizeof (char *) * (argc + 2));
argv = ++nargv;
@@ -828,7 +830,6 @@ evalcommand(union node *cmd, int flags)
status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...d != COMMANDCMD)
- break;
-
- path = oldpath;
- nargv = parse_command_args(argv, &path);
- if (!nargv)
- break;
- argc -= nargv - argv;
- argv = nargv;
- cmd_flag |= DO_NOFUNC;
+ goto bail;
}
}
@@ -864,6 +882,7 @@ bail:
FORCEINTON;
}
listsetvar(varlist.list, VEXPORT|VSTACK);
+ path = unlikely(path) ? path : pathval();
shellexec(argv, path, cmdentry.u.index);
/* NOTREACHED */
diff --git a/usr/dash/exec.c b/usr/dash/exec.c
index 6c0a64f6..9d0215a6 100644
--- a/usr/dash/exec.c
+++ b/usr/dash/exec.c
@@ -357,11 +357,8 @@ find_command(char *name, struct cmd...