search for: listsetvar

Displaying 8 results from an estimated 8 matches for "listsetvar".

Did you mean: listserver
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...bc.git;a=commit;h=cbf6b9e61bc7e49b8863901ef0bf85483af5861f Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:55 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: eval: Replace with listsetvar with mklocal/setvareq [ dash commit 811a36120aef848cd308d56e06bf62e721be853c ] This patch replaces listsetvar with mklocal/setvareq. As we now determine special built-in status prior to variable assignment, we no longer have to do a second pass listsetvar. Instead we will call setvareq directly...
2019 Jan 25
0
[klibc:update-dash] jobs - Do not block when waiting on SIGCHLD
...4 --- a/usr/dash/eval.c +++ 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...
2020 Mar 28
0
[klibc:update-dash] dash: jobs - Do not block when waiting on SIGCHLD
...4 --- a/usr/dash/eval.c +++ 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...
2019 Jan 25
0
[klibc:update-dash] [ERROR] Set exitstatus in onint
...+105,7 @@ onint(void) { 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: -...
2019 Jan 25
0
[klibc:update-dash] [EVAL] Do not clobber exitstatus in evalcommand
...igned-off-by: Ben Hutchings <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;...
2020 Mar 28
0
[klibc:update-dash] dash: [ERROR] Set exitstatus in onint
...+105,7 @@ onint(void) { 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: -...
2020 Mar 28
0
[klibc:update-dash] dash: [EVAL] Do not clobber exitstatus in evalcommand
...igned-off-by: Ben Hutchings <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;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...++; - if (cmdentry.u.cmd != 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(...