Lines Matching refs:_ctx
35 } _ctx; variable
45 _ctx.identity = (p != NULL) ? p + 1 : identity; in zed_log_init()
47 _ctx.identity = NULL; in zed_log_init()
49 _ctx.pipe_fd[0] = -1; in zed_log_init()
50 _ctx.pipe_fd[1] = -1; in zed_log_init()
70 if ((_ctx.pipe_fd[0] != -1) || (_ctx.pipe_fd[1] != -1)) in zed_log_pipe_open()
74 if (pipe(_ctx.pipe_fd) < 0) in zed_log_pipe_open()
88 if (_ctx.pipe_fd[0] < 0) in zed_log_pipe_close_reads()
93 if (close(_ctx.pipe_fd[0]) < 0) in zed_log_pipe_close_reads()
98 _ctx.pipe_fd[0] = -1; in zed_log_pipe_close_reads()
113 if (_ctx.pipe_fd[1] < 0) in zed_log_pipe_close_writes()
118 if (close(_ctx.pipe_fd[1]) < 0) in zed_log_pipe_close_writes()
123 _ctx.pipe_fd[1] = -1; in zed_log_pipe_close_writes()
139 if (_ctx.pipe_fd[0] < 0) in zed_log_pipe_wait()
144 n = read(_ctx.pipe_fd[0], &c, sizeof (c)); in zed_log_pipe_wait()
165 _ctx.do_stderr = 1; in zed_log_stderr_open()
166 _ctx.priority = priority; in zed_log_stderr_open()
175 if (_ctx.do_stderr) in zed_log_stderr_close()
176 _ctx.do_stderr = 0; in zed_log_stderr_close()
186 _ctx.do_syslog = 1; in zed_log_syslog_open()
187 openlog(_ctx.identity, LOG_NDELAY | LOG_PID, facility); in zed_log_syslog_open()
196 if (_ctx.do_syslog) { in zed_log_syslog_close()
197 _ctx.do_syslog = 0; in zed_log_syslog_close()
220 if (_ctx.do_syslog) in _zed_log_aux()
223 if (_ctx.do_stderr && (priority <= _ctx.priority)) in _zed_log_aux()