Lines Matching refs:log_fd
38 static int log_fd = -1; variable
98 fchown(log_fd, ent_pw->pw_uid, -1) != 0) in log_start()
106 if (log_fd != -1) in log_reopen()
107 close(log_fd); in log_reopen()
113 log_fd = open(log_file, O_WRONLY|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR|S_IRGRP); in log_reopen()
114 return log_fd != -1; in log_reopen()
121 log_fd = -1; in log_reopen()
125 log_fd = socket(AF_UNIX, connection_type, 0); in log_reopen()
127 if (log_fd == -1) in log_reopen()
131 if (max_logs != 0 && (flags = fcntl(log_fd, F_GETFL)) != -1) in log_reopen()
132 fcntl(log_fd, F_SETFL, flags | O_NONBLOCK); in log_reopen()
162 if ((rc = write(log_fd, entries->payload + entries->offset, entries->length)) != -1) in log_write()
221 if (connect(log_fd, (struct sockaddr *)&logaddr, sizeof(logaddr)) != -1) in log_write()
249 log_fd = -1; in log_write()
302 if (log_fd == -1) in my_syslog()
399 if (entries && log_fd != -1 && connection_good) in set_log_writer()
401 FD_SET(log_fd, set); in set_log_writer()
402 bump_maxfd(log_fd, maxfdp); in set_log_writer()
408 if (log_fd != -1 && (!set || FD_ISSET(log_fd, set))) in check_log_writer()
415 if (log_fd != -1) in flush_log()
418 if ((flags = fcntl(log_fd, F_GETFL)) != -1) in flush_log()
419 fcntl(log_fd, F_SETFL, flags & ~O_NONBLOCK); in flush_log()
421 close(log_fd); in flush_log()