Changeset 2424 for trunk/src/kash/eval.c


Ignore:
Timestamp:
Oct 18, 2010, 10:52:03 AM (15 years ago)
Author:
bird
Message:

kash: Some S-bahn optimizations.

File:
1 edited

Legend:

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

    r2423 r2424  
    511511                        INTON;
    512512                        if (prevfd > 0) {
    513                                 shfile_close(&psh->fdtab, 0);
    514                                 copyfd(psh, prevfd, 0);
    515                                 shfile_close(&psh->fdtab, prevfd);
     513                                movefd(psh, prevfd, 0);
    516514                        }
    517515                        if (pip[1] >= 0) {
    518516                                shfile_close(&psh->fdtab, pip[0]);
    519517                                if (pip[1] != 1) {
    520                                         shfile_close(&psh->fdtab, 1);
    521                                         copyfd(psh, pip[1], 1);
    522                                         shfile_close(&psh->fdtab, pip[1]);
     518                                        movefd(psh, pip[1], 1);
    523519                                }
    524520                        }
     
    582578                        shfile_close(&psh->fdtab, pip[0]);
    583579                        if (pip[1] != 1) {
    584                                 shfile_close(&psh->fdtab, 1);
    585                                 copyfd(psh, pip[1], 1);
    586                                 shfile_close(&psh->fdtab, pip[1]);
     580                                movefd(psh, pip[1], 1);
    587581                        }
    588582                        eflag(psh) = 0;
     
    911905                        shfile_close(&psh->fdtab, pip[0]);
    912906                        if (pip[1] != 1) {
    913                                 shfile_close(&psh->fdtab, 1);
    914                                 copyfd(psh, pip[1], 1);
    915                                 shfile_close(&psh->fdtab, pip[1]);
     907                                movefd(psh, pip[1], 1);
    916908                        }
    917909                }
Note: See TracChangeset for help on using the changeset viewer.