Lines Matching refs:nfd
278 int nfd; in set_tracefile() local
345 nfd = open(fn, O_CREAT|O_EXCL|O_WRONLY, 0644); in set_tracefile()
346 if (nfd != -1 && fstat(nfd, &stbuf) == -1) { in set_tracefile()
347 (void) close(nfd); in set_tracefile()
351 nfd = open(fn, O_APPEND|O_WRONLY, 0644); in set_tracefile()
356 if (nfd == -1 || (n_ftrace = fdopen(nfd, "a")) == NULL) { in set_tracefile()
361 if (nfd != -1) in set_tracefile()
362 (void) close(nfd); in set_tracefile()
366 if (fstat(nfd, &stbuf2) == -1 || !S_ISREG(stbuf2.st_mode) || in set_tracefile()
375 (void) dup2(nfd, STDOUT_FILENO); in set_tracefile()
376 (void) dup2(nfd, STDERR_FILENO); in set_tracefile()