Changeset 1207 for trunk/src/kash/show.c


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/show.c

    r1206 r1207  
    290290        if (debug(psh) != 1)
    291291                return;
    292         fprintf(tracefile, "[%d] ", getpid());
     292        fprintf(tracefile, "[%d] ", sh_getpid(psh));
    293293        va_start(va, fmt);
    294294        (void) vfprintf(tracefile, fmt, va);
     
    303303        if (debug(psh) != 1)
    304304                return;
    305         fprintf(tracefile, "[%d] ", getpid());
     305        fprintf(tracefile, "[%d] ", sh_getpid(psh));
    306306        (void) vfprintf(tracefile, fmt, va);
    307307#endif
     
    396396                char *p;
    397397                if ((p = getenv("HOME")) == NULL) {
    398                         if (geteuid() == 0)
     398                        if (sh_geteuid(psh) == 0)
    399399                                p = "/";
    400400                        else
     
    421421        }
    422422#if defined(O_APPEND) && !defined(_MSC_VER)
    423         if ((flags = fcntl(fileno(tracefile), F_GETFL, 0)) >= 0)
    424                 fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND);
     423        if ((flags = shfile_fcntl(&psh->fdtab, fileno(tracefile), F_GETFL, 0)) >= 0)
     424                shfile_fcntl(&psh->fdtab, fileno(tracefile), F_SETFL, flags | O_APPEND);
    425425#endif
    426426        setvbuf(tracefile, (char *)NULL, _IOLBF, 0); //setlinebuf(tracefile);
Note: See TracChangeset for help on using the changeset viewer.