void log_flush(void) { in_logger = 1; log_file_fsync(&log); log_file_fsync(&pot); in_logger = 0; }
void log_flush(void) { in_logger = 1; if (options.fork) log_file_flush(&log); else log_file_fsync(&log); log_file_fsync(&pot); in_logger = 0; }
static void log_file_done(struct log_file *f) { if (f->fd < 0) return; log_file_fsync(f); if (close(f->fd)) pexit("close"); f->fd = -1; MEM_FREE(f->buffer); }
static void log_file_done(struct log_file *f, int do_sync) { if (f->fd < 0) return; if (do_sync) log_file_fsync(f); else log_file_flush(f); if (close(f->fd)) pexit("close"); f->fd = -1; MEM_FREE(f->buffer); }