Changeset 1207 for trunk/src/kash/show.c
- Timestamp:
- Oct 7, 2007, 7:09:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/show.c
r1206 r1207 290 290 if (debug(psh) != 1) 291 291 return; 292 fprintf(tracefile, "[%d] ", getpid());292 fprintf(tracefile, "[%d] ", sh_getpid(psh)); 293 293 va_start(va, fmt); 294 294 (void) vfprintf(tracefile, fmt, va); … … 303 303 if (debug(psh) != 1) 304 304 return; 305 fprintf(tracefile, "[%d] ", getpid());305 fprintf(tracefile, "[%d] ", sh_getpid(psh)); 306 306 (void) vfprintf(tracefile, fmt, va); 307 307 #endif … … 396 396 char *p; 397 397 if ((p = getenv("HOME")) == NULL) { 398 if ( geteuid() == 0)398 if (sh_geteuid(psh) == 0) 399 399 p = "/"; 400 400 else … … 421 421 } 422 422 #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); 425 425 #endif 426 426 setvbuf(tracefile, (char *)NULL, _IOLBF, 0); //setlinebuf(tracefile);
Note:
See TracChangeset
for help on using the changeset viewer.