Lines Matching defs:logfile
126 static FILE *logfile = NULL;
202 if (st->st_log_flags & STARTD_LOG_FILE && logfile) {
203 (void) fputs(buf, logfile);
204 (void) fflush(logfile);
261 * logfile and syslogd file descriptors from being leaked to child processes.
278 char logfile[PATH_MAX];
284 (void) snprintf(logfile, PATH_MAX, "%s/%s", st->st_log_prefix, logstem);
287 fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND,
326 char logfile[PATH_MAX];
334 (void) snprintf(logfile, PATH_MAX, "%s/%s", st->st_log_prefix,
338 fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND,
346 "failed with %s.\n", fmri, logfile, strerror(err));
650 if (logfile) {
651 (void) fclose(logfile);
652 logfile = NULL;
684 if ((logfile = fdopen(logfd, "a")) == NULL)
686 log_error(LOG_WARNING, "can't open logfile %s/%s",
689 if (logfile &&
690 fcntl(fileno(logfile), F_SETFD, FD_CLOEXEC) == -1)
692 "couldn't mark logfile close-on-exec: %s\n",