open_log
static int open_log(const char *, mode_t);
state.output_fd = open_log(state.output_filename, state.output_file_mode);
outfd = open_log(state->output_filename, state->output_file_mode);