Displaying 5 results from an estimated 5 matches for "redirtab".
Did you mean:
redirt
2020 Mar 28
0
[klibc:update-dash] dash: redir: Handle nested exec within REALLY_CLOSED redirection
...etions(-)
diff --git a/usr/dash/redir.c b/usr/dash/redir.c
index e67cc0ab..6c81dd02 100644
--- a/usr/dash/redir.c
+++ b/usr/dash/redir.c
@@ -57,7 +57,6 @@
#include "error.h"
-#define REALLY_CLOSED -3 /* fd that was closed and still is */
#define EMPTY -2 /* marks an unused slot in redirtab */
#define CLOSED -1 /* fd opened for redir needs to be closed */
@@ -77,6 +76,9 @@ struct redirtab {
MKINIT struct redirtab *redirlist;
+/* Bit map of currently closed file descriptors. */
+static unsigned closed_redirs;
+
STATIC int openredirect(union node *);
#ifdef notyet
STATIC voi...
2019 Jan 25
0
[klibc:update-dash] eval: Restore input files in evalcommand
...rtions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 811c28a4..5fd1c7c1 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
struct redirtab *redir_stop;
struct stackmark smark;
union node *argp;
@@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags)
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
localvar_stop = pushlocalvars();
+ file_stop = parsefile;
back_exitstatus...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Restore input files in evalcommand
...rtions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 26055493..e28e56cb 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -694,6 +694,7 @@ evalcommand(union node *cmd, int flags)
#endif
{
struct localvar_list *localvar_stop;
+ struct parsefile *file_stop;
struct redirtab *redir_stop;
struct stackmark smark;
union node *argp;
@@ -722,6 +723,7 @@ evalcommand(union node *cmd, int flags)
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
setstackmark(&smark);
localvar_stop = pushlocalvars();
+ file_stop = parsefile;
back_exitstatus...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...skip == 0 ; cp = cp->nclist.next) {
@@ -459,8 +460,6 @@ evalcase(union node *n, int flags)
}
}
out:
- popstackmark(&smark);
-
return status;
}
@@ -717,7 +716,6 @@ evalcommand(union node *cmd, int flags)
struct localvar_list *localvar_stop;
struct parsefile *file_stop;
struct redirtab *redir_stop;
- struct stackmark smark;
union node *argp;
struct arglist arglist;
struct arglist varlist;
@@ -746,7 +744,6 @@ evalcommand(union node *cmd, int flags)
/* First expand the arguments. */
TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
- setstackmark(&...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...t>
diff --git a/usr/dash/redir.c b/usr/dash/redir.c
index d4d9c39..33dbc88 100644
--- a/usr/dash/redir.c
+++ b/usr/dash/redir.c
@@ -119,7 +119,7 @@ redirect(union node *redir, int flags)
}
sv = NULL;
INTOFF;
- if (flags & REDIR_PUSH) {
+ if (likely(flags & REDIR_PUSH)) {
struct redirtab *q;
q = ckmalloc(sizeof (struct redirtab));
q->next = redirlist;
@@ -132,12 +132,11 @@ redirect(union node *redir, int flags)
}
n = redir;
do {
- fd = n->nfile.fd;
- if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
- n->ndup.dupfd == fd)
- cont...