Ignore:
Timestamp:
Oct 7, 2007, 7:09:24 PM (18 years ago)
Author:
bird
Message:

jobs and other stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/redir.c

    r1202 r1207  
    138138                        INTOFF;
    139139again:
    140                         if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {
     140                        if ((i = shfile_fcntl(&psh->fdtab, fd, F_DUPFD, 10)) == -1) {
    141141                                switch (errno) {
    142142                                case EBADF:
     
    155155                        if (!try) {
    156156                                sv->renamed[fd] = i;
    157                                 close(fd);
     157                                shfile_close(&psh->fdtab, fd);
    158158                        }
    159159                        INTON;
    160160                } else {
    161                         close(fd);
     161                        shfile_close(&psh->fdtab, fd);
    162162                }
    163163                if (fd == 0)
     
    198198                        goto eopen;
    199199                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);
    201201                break;
    202202        case NFROMTO:
     
    272272        }
    273273        if (forkshell(psh, (struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) {
    274                 close(pip[0]);
     274                shfile_close(&psh->fdtab, pip[0]);
    275275                signal(SIGINT, SIG_IGN);
    276276                signal(SIGQUIT, SIG_IGN);
     
    287287        }
    288288out:
    289         close(pip[1]);
     289        shfile_close(&psh->fdtab, pip[1]);
    290290        return pip[0];
    291291}
     
    359359                for (i = 0 ; i < 10 ; i++) {
    360360                        if (rp->renamed[i] >= 0) {
    361                                 close(rp->renamed[i]);
     361                                shfile_close(&psh->fdtab, rp->renamed[i]);
    362362                        }
    363363                        if (!vforked)
Note: See TracChangeset for help on using the changeset viewer.