Changeset 3435 for trunk/src/kash/eval.c
- Timestamp:
- Sep 2, 2020, 10:30:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/eval.c
r3434 r3435 773 773 * evalcommand_out, evalcommand_parent, evalcommand_doit, evalcommand_child 774 774 */ 775 /*int vforked = 0; */775 /*int vforked = 0; - obsolete */ 776 776 777 777 /* Both child and parent exits thru here. */ … … 983 983 trputs(psh, "normal command: "); trargs(psh, args->argv); 984 984 #endif 985 clearredir(psh, psh->vforked); 986 redirect(psh, cmd->ncmd.redirect, psh->vforked ? REDIR_VFORK : 0); 987 if (!psh->vforked) 988 for (sp = args->varlist.list ; sp ; sp = sp->next) 989 setvareq(psh, sp->text, VEXPORT|VSTACK); 985 clearredir(psh); 986 redirect(psh, cmd->ncmd.redirect, 0); 987 for (sp = args->varlist.list ; sp ; sp = sp->next) 988 setvareq(psh, sp->text, VEXPORT|VSTACK); 990 989 envp = environment(psh); 991 shellexec(psh, args->argv, envp, args->path, args->cmdentry.u.index , psh->vforked);990 shellexec(psh, args->argv, envp, args->path, args->cmdentry.u.index); 992 991 break; 993 992 } … … 1014 1013 const char *path = pathval(psh); 1015 1014 1016 psh->vforked = 0;1017 1015 /* First expand the arguments. */ 1018 1016 TRACE((psh, "evalcommand(0x%lx, %d) called\n", (long)cmd, flags)); … … 1153 1151 1154 1152 if (flags & EV_BACKCMD) { 1155 if (!psh->vforked) { 1156 FORCEINTON; 1157 } 1153 FORCEINTON; 1158 1154 shfile_close(&psh->fdtab, pip[0]); 1159 1155 if (pip[1] != 1) { … … 1304 1300 for (sp = psh->cmdenviron; sp; sp = sp->next) 1305 1301 setvareq(psh, sp->text, VEXPORT|VSTACK); 1306 shellexec(psh, argv + 1, environment(psh), pathval(psh), 0 , 0);1302 shellexec(psh, argv + 1, environment(psh), pathval(psh), 0); 1307 1303 } 1308 1304 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.