Displaying 2 results from an estimated 2 matches for "redirlist".
Did you mean:
dirlist
2020 Mar 28
0
[klibc:update-dash] dash: redir: Handle nested exec within REALLY_CLOSED redirection
...r, as it stands it can
remove a close(2) call that's actually needed. This happens when
an enclosed exec(1) command leaves an open file descriptor behind.
This patch fixes this by replacing REALLY_CLOSED with closed_redirs
to track the current status of redirected file descriptors and
leaving redirlist to only handle the previous state of redirected
file descriptors.
Reported-by: Martijn Dekker <martijn at inlv.org>
Fixes: ce0f1900d869 ("[REDIR] Fix redirect restore on saved file...")
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings &l...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...3dbc88 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)
- continue; /* redirect from/to same file descriptor */
-
newfd = openredire...