Lines Matching refs:logfile
125 static FILE *logfile = NULL;
201 if (st->st_log_flags & STARTD_LOG_FILE && logfile) {
202 (void) fputs(buf, logfile);
203 (void) fflush(logfile);
260 * logfile and syslogd file descriptors from being leaked to child processes.
277 char logfile[PATH_MAX];
283 (void) snprintf(logfile, PATH_MAX, "%s/%s", st->st_log_prefix, logstem);
286 fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND,
325 char logfile[PATH_MAX];
333 (void) snprintf(logfile, PATH_MAX, "%s/%s", st->st_log_prefix,
337 fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND,
345 "failed with %s.\n", fmri, logfile, strerror(err));
649 if (logfile) {
650 (void) fclose(logfile);
651 logfile = NULL;
683 if ((logfile = fdopen(logfd, "a")) == NULL)
685 log_error(LOG_WARNING, "can't open logfile %s/%s",
688 if (logfile &&
689 fcntl(fileno(logfile), F_SETFD, FD_CLOEXEC) == -1)
691 "couldn't mark logfile close-on-exec: %s\n",