search for: openhere

Displaying 3 results from an estimated 3 matches for "openhere".

Did you mean: opener
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix old-style command substitution here-document crash
...========================= > ==39623==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x0000005768ed bp 0x7ffc00273df0 sp 0x7ffc00273c60 T0) > ==39623==The signal is caused by a READ memory access. > ==39623==Hint: address points to the zero page. > #0 0x5768ec in openhere /home/jfe/dash/src/redir.c:305:29 > #1 0x574d92 in openredirect /home/jfe/dash/src/redir.c:230:7 > #2 0x5737fe in redirect /home/jfe/dash/src/redir.c:121:11 > #3 0x576017 in redirectsafe /home/jfe/dash/src/redir.c:424:3 > #4 0x522326 in evalcommand /home/jfe/dash/src/eva...
2020 Mar 28
0
[klibc:update-dash] dash: redir: Handle nested exec within REALLY_CLOSED redirection
...ruct redirtab *redirlist; +/* Bit map of currently closed file descriptors. */ +static unsigned closed_redirs; + STATIC int openredirect(union node *); #ifdef notyet STATIC void dupredirect(union node *, int, char[10]); @@ -86,6 +88,20 @@ STATIC void dupredirect(union node *, int); STATIC int openhere(union node *); +static unsigned update_closed_redirs(int fd, int nfd) +{ + unsigned val = closed_redirs; + unsigned bit = 1 << fd; + + if (nfd >= 0) + closed_redirs &= ~bit; + else + closed_redirs |= bit; + + return val & bit; +} + + /* * Process a list of redirection comm...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...NTOFD: + case NFROMFD: + f = redir->ndup.dupfd; + if (f == redir->nfile.fd) + f = -2; + break; default: #ifdef DEBUG abort(); #endif /* Fall through to eliminate warning. */ - case NTOFD: - case NFROMFD: - f = redir->ndup.dupfd; - break; case NHERE: case NXHERE: f = openhere(redir); commit 725a7524011ba02c02493750e93eaace6ddc5280 Author: Herbert Xu <herbert at gondor.apana.org.au> Date: Sat May 12 18:09:24 2007 +1000 Fix redirect restore on saved file descriptors As it stands if a redirection occurs on a file descriptor that was previously cl...