Displaying 2 results from an estimated 2 matches for "5ccfa9f1".
2019 Jan 25
0
[klibc:update-dash] [SHELL] Optimize dash -c "command" to avoid a fork
...+165,7 @@ evalstring(char *s, int flags)
status = 0;
while ((n = parsecmd(0)) != NEOF) {
- evaltree(n, flags);
+ evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
status = exitstatus;
popstackmark(&smark);
if (evalskip)
diff --git a/usr/dash/eval.h b/usr/dash/eval.h
index 5ccfa9f1..dc8acd2a 100644
--- a/usr/dash/eval.h
+++ b/usr/dash/eval.h
@@ -46,6 +46,10 @@ struct backcmd { /* result of evalbackcmd */
struct job *jp; /* job structure for command */
};
+/* flags in argument to evaltree */
+#define EV_EXIT 01 /* exit after evaluating tree */
+#define EV_TESTED 02 /*...
2020 Mar 28
0
[klibc:update-dash] dash: [SHELL] Optimize dash -c "command" to avoid a fork
...+165,7 @@ evalstring(char *s, int flags)
status = 0;
while ((n = parsecmd(0)) != NEOF) {
- evaltree(n, flags);
+ evaltree(n, flags & ~(parser_eof() ? 0 : EV_EXIT));
status = exitstatus;
popstackmark(&smark);
if (evalskip)
diff --git a/usr/dash/eval.h b/usr/dash/eval.h
index 5ccfa9f1..dc8acd2a 100644
--- a/usr/dash/eval.h
+++ b/usr/dash/eval.h
@@ -46,6 +46,10 @@ struct backcmd { /* result of evalbackcmd */
struct job *jp; /* job structure for command */
};
+/* flags in argument to evaltree */
+#define EV_EXIT 01 /* exit after evaluating tree */
+#define EV_TESTED 02 /*...