- log_ident = ident;
- log_opt = opt;
- log_facility = facility;
-
- if (!(opt & LOG_NDELAY) || log_fd>=0) return;
-
- log_fd = socket(AF_UNIX, SOCK_DGRAM, 0);
- fcntl(log_fd, F_SETFD, FD_CLOEXEC);
+ log_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ if (log_fd >= 0) connect(log_fd, (void *)&log_addr, sizeof log_addr);