Changeset 3442 for trunk/src/kash/redir.c
- Timestamp:
- Sep 10, 2020, 2:06:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/redir.c
r3438 r3442 90 90 STATIC void openredirect(shinstance *, union node *, char[10], int); 91 91 STATIC int openhere(shinstance *, union node *); 92 93 94 #ifndef SH_FORKED_MODE 95 void 96 subshellinitredir(shinstance *psh, shinstance *inherit) 97 { 98 /* We can have a redirlist here if we're handling backtick while expanding 99 arguments, just copy it even if the subshell probably doesn't need it. */ 100 struct redirtab *src = inherit->redirlist; 101 if (src) 102 { 103 struct redirtab **dstp = &psh->redirlist; 104 do 105 { 106 struct redirtab *dst = ckmalloc(psh, sizeof(dst)); 107 memcpy(dst->renamed, src->renamed, sizeof(dst->renamed)); 108 *dstp = dst; 109 dstp = &dst->next; 110 src = src->next; 111 } while (src); 112 *dstp = NULL; 113 114 psh->fd0_redirected = inherit->fd0_redirected; 115 } 116 } 117 #endif /* !SH_FORKED_MODE */ 92 118 93 119
Note:
See TracChangeset
for help on using the changeset viewer.