Displaying 3 results from an estimated 3 matches for "cmdunknown".
Did you mean:
addunknown
2020 Mar 28
0
[klibc:update-dash] dash: eval: Fail immediately with redirections errors for simple command
...rgp->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], &cmdentry, cmd_flag | DO_ERR,
unlikely(path) ? path : pathval());
- if (cmdentry.cmdtype == CMDUNKNOWN) {
- status = 127;
-#ifdef FLUSHERR
- flushout(&errout);
-#endif
- goto bail;
- }
- }
-
- if (status) {
-bail:
- exitstatus = status;
-
- /* We have a redirection error. */
- if (spclbltin > 0)
- exraise(EXERROR);
-
- goto out;
}
jp = NULL;
/* Execute the command. */...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...R
flushout(out);
#endif
}
- execcmd = 0;
- spclbltin = -1;
-
/* Now locate the command. */
- if (argc) {
- const char *oldpath;
- int cmd_flag = DO_ERR;
-
- path += 5;
- oldpath = path;
- for (;;) {
- find_command(argv[0], &cmdentry, cmd_flag, path);
- if (cmdentry.cmdtype == CMDUNKNOWN) {
- status = 127;
+ if (cmdentry.cmdtype != CMDBUILTIN ||
+ !(cmdentry.u.cmd->flags & BUILTIN_REGULAR)) {
+ find_command(argv[0], &cmdentry, cmd_flag | DO_ERR,
+ unlikely(path) ? path : pathval());
+ if (cmdentry.cmdtype == CMDUNKNOWN) {
+ status = 127;
#ifdef FLUSHER...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Never rehash regular built-ins
...;
+ (cmdp->cmdtype == CMDNORMAL ||
+ (cmdp->cmdtype == CMDBUILTIN &&
+ !(cmdp->param.cmd->flags & BUILTIN_REGULAR) &&
+ builtinloc > 0)))
delete_cmd_entry();
find_command(name, &entry, DO_ERR, pathval());
if (entry.cmdtype == CMDUNKNOWN)
@@ -377,7 +379,8 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
bit = DO_NOFUNC;
break;
case CMDBUILTIN:
- bit = DO_ALTBLTIN;
+ bit = cmdp->param.cmd->flags & BUILTIN_REGULAR ?
+ 0 : DO_ALTBLTIN;
break;
}
if (act & bit)...