Changeset 1207 for trunk/src/kash/redir.c
- Timestamp:
- Oct 7, 2007, 7:09:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/redir.c
r1202 r1207 138 138 INTOFF; 139 139 again: 140 if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {140 if ((i = shfile_fcntl(&psh->fdtab, fd, F_DUPFD, 10)) == -1) { 141 141 switch (errno) { 142 142 case EBADF: … … 155 155 if (!try) { 156 156 sv->renamed[fd] = i; 157 close(fd);157 shfile_close(&psh->fdtab, fd); 158 158 } 159 159 INTON; 160 160 } else { 161 close(fd);161 shfile_close(&psh->fdtab, fd); 162 162 } 163 163 if (fd == 0) … … 198 198 goto eopen; 199 199 if (eflags) 200 (void) fcntl(f, F_SETFL, fcntl(f, F_GETFL, 0) & ~eflags);200 (void)shfile_fcntl(&psh->fdtab, f, F_SETFL, shfile_fcntl(&psh->fdtab, f, F_GETFL, 0) & ~eflags); 201 201 break; 202 202 case NFROMTO: … … 272 272 } 273 273 if (forkshell(psh, (struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) { 274 close(pip[0]);274 shfile_close(&psh->fdtab, pip[0]); 275 275 signal(SIGINT, SIG_IGN); 276 276 signal(SIGQUIT, SIG_IGN); … … 287 287 } 288 288 out: 289 close(pip[1]);289 shfile_close(&psh->fdtab, pip[1]); 290 290 return pip[0]; 291 291 } … … 359 359 for (i = 0 ; i < 10 ; i++) { 360 360 if (rp->renamed[i] >= 0) { 361 close(rp->renamed[i]);361 shfile_close(&psh->fdtab, rp->renamed[i]); 362 362 } 363 363 if (!vforked)
Note:
See TracChangeset
for help on using the changeset viewer.