search for: spclbltin

Displaying 13 results from an estimated 13 matches for "spclbltin".

2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...command. @@ -702,6 +723,7 @@ evalcommand(union node *cmd, int flags) struct arglist varlist; char **argv; int argc; + struct strlist *osp; struct strlist *sp; #ifdef notyet int pip[2]; @@ -711,6 +733,7 @@ evalcommand(union node *cmd, int flags) char *lastarg; const char *path; int spclbltin; + int cmd_flag; int execcmd; int status; char **nargv; @@ -733,13 +756,47 @@ evalcommand(union node *cmd, int flags) arglist.lastp = &arglist.list; *arglist.lastp = NULL; + cmd_flag = 0; + execcmd = 0; + spclbltin = -1; + path = NULL; + argc = 0; - for (argp = cmd->ncmd.args;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...d 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, cmd_flag | DO_REGBLTIN, pathval()); + vlocal++; + /* implement bltin and command here */ if (cmdent...
2019 Jan 25
0
[klibc:update-dash] [ERROR] Set exitstatus in onint
...+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->loc, 1); + if (exception == EXERROR) { + exitstatus = 2; + if (spclbltin <= 0) { + FORCEINTON; + break; + } } - FORCEINTON; +raise: + longjmp(handler->loc, 1); } break;
2019 Jan 25
0
[klibc:update-dash] [EVAL] Do not clobber exitstatus in evalcommand
.../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(handler->loc, 1);
2020 Mar 28
0
[klibc:update-dash] dash: [ERROR] Set exitstatus in onint
...+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->loc, 1); + if (exception == EXERROR) { + exitstatus = 2; + if (spclbltin <= 0) { + FORCEINTON; + break; + } } - FORCEINTON; +raise: + longjmp(handler->loc, 1); } break;
2020 Mar 28
0
[klibc:update-dash] dash: [EVAL] Do not clobber exitstatus in evalcommand
.../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(handler->loc, 1);
2020 Mar 28
0
[klibc:update-dash] dash: eval: Fail immediately with redirections errors for simple command
...+ b/usr/dash/eval.c @@ -818,6 +818,17 @@ evalcommand(union node *cmd, int flags) redir_stop = pushredir(cmd->ncmd.redirect); status = redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2); + if (status) { +bail: + exitstatus = status; + + /* We have a redirection error. */ + if (spclbltin > 0) + exraise(EXERROR); + + goto out; + } + for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) { struct strlist **spp; @@ -848,30 +859,19 @@ evalcommand(union node *cmd, int flags) !(cmdentry.u.cmd->flags & BUILTIN_REGULAR)) { find_command(argv[0], &...
2019 Jan 25
0
[klibc:update-dash] jobs - Do not block when waiting on SIGCHLD
...G) != 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.cmd, argc, argv, flags) && + !(exception == EXERROR && spclbltin <= 0)) { raise: longjmp(handler->loc, 1); } @@ -892,6 +887,7 @@ raise: } status = waitforjob(jp); + FORCEINTON; out:...
2020 Mar 28
0
[klibc:update-dash] dash: jobs - Do not block when waiting on SIGCHLD
...G) != 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.cmd, argc, argv, flags) && + !(exception == EXERROR && spclbltin <= 0)) { raise: longjmp(handler->loc, 1); } @@ -892,6 +887,7 @@ raise: } status = waitforjob(jp); + FORCEINTON; out:...
2019 Jan 25
0
[klibc:update-dash] eval: Reap zombies after built-in commands and functions
...default: @@ -856,7 +858,6 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - status = waitforjob(jp); INTON; break; } @@ -875,22 +876,22 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - goto readstatus; + break; } raise: longjmp(handler->loc, 1); } - goto readstatus; + break; case CMDFUNCTION: poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; -readstatus: - status = exitstatus; break...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Reap zombies after built-in commands and functions
...default: @@ -856,7 +858,6 @@ bail: INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - status = waitforjob(jp); INTON; break; } @@ -875,22 +876,22 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - goto readstatus; + break; } raise: longjmp(handler->loc, 1); } - goto readstatus; + break; case CMDFUNCTION: poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; -readstatus: - status = exitstatus; break...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - exitstatus = waitforjob(jp); + status = waitforjob(jp); INTON; break; } @@ -868,17 +875,19 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - break; + goto readstatus; } raise: longjmp(handler->loc, 1); } - break; + goto readstatus; case CMDFUNCTION: poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; +readstatus: + status = exitstatus; break...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...INTOFF; jp = makejob(cmd, 1); if (forkshell(jp, cmd, FORK_FG) != 0) { - exitstatus = waitforjob(jp); + status = waitforjob(jp); INTON; break; } @@ -868,17 +875,19 @@ bail: if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) { if (exception == EXERROR && spclbltin <= 0) { FORCEINTON; - break; + goto readstatus; } raise: longjmp(handler->loc, 1); } - break; + goto readstatus; case CMDFUNCTION: poplocalvars(1); if (evalfun(cmdentry.u.func, argc, argv, flags)) goto raise; +readstatus: + status = exitstatus; break...