Changeset 3440 in kBuild
- Timestamp:
- Sep 10, 2020 11:38:27 AM (5 years ago)
- Location:
- trunk/src/kash
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/eval.c
r3438 r3440 104 104 STATIC void evalsubshell(shinstance *, union node *, int); 105 105 STATIC void expredir(shinstance *, union node *); 106 STATIC void expredircleanup(shinstance *, union node *); 106 107 STATIC void evalpipe(shinstance *, union node *); 107 108 STATIC void evalcommand(shinstance *, union node *, int, struct backcmd *); … … 251 252 evaltree(psh, n->nredir.n, flags); 252 253 popredir(psh); 254 expredircleanup(psh, n->nredir.redirect); 253 255 break; 254 256 case NSUBSHELL: … … 473 475 psh->exitstatus = waitforjob(psh, jp); 474 476 INTON; 477 expredircleanup(psh, n->nredir.redirect); 475 478 } 476 479 … … 504 507 fixredir(psh, redir, fn.list->text, 1); 505 508 } 509 break; 510 } 511 } 512 } 513 514 STATIC void 515 expredircleanup(shinstance *psh, union node *n) 516 { 517 for (; n ; n = n->nfile.next) { 518 struct arglist fn; 519 fn.lastp = &fn.list; 520 switch (n->type) { 521 case NFROMTO: 522 case NFROM: 523 case NTO: 524 case NCLOBBER: 525 case NAPPEND: 526 n->nfile.expfname = NULL; 506 527 break; 507 528 } … … 1238 1259 evalcommand_parent(psh, flags, args.lastarg, &args.smark, mode, jp, 1239 1260 args.pip, backcmd); 1261 expredircleanup(psh, cmd->ncmd.redirect); 1240 1262 return; /* at end of routine */ 1241 1263 } … … 1248 1270 evalcommand_doit(psh, cmd, &args); 1249 1271 } 1272 expredircleanup(psh, cmd->ncmd.redirect); 1250 1273 } 1251 1274 -
trunk/src/kash/parser.c
r3439 r3440 1204 1204 1205 1205 np = (union node *)stalloc(psh, sizeof (struct nfile)); 1206 np->nfile.expfname = NULL; 1206 1207 if (c == '>') { 1207 1208 np->nfile.fd = 1; … … 1793 1794 ppnext = &dst->next; 1794 1795 dst->n = copyparsetree(psh, src->n); 1796 src = src->next; 1795 1797 } 1796 1798 }
Note:
See TracChangeset
for help on using the changeset viewer.