Lines Matching refs:wp
33 struct fpm_worker_pool_s *wp; in fpm_log_open() local
37 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_log_open()
38 if (!wp->config->access_log) { in fpm_log_open()
43 fd = open(wp->config->access_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR); in fpm_log_open()
45 zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log); in fpm_log_open()
48 zlog(ZLOG_DEBUG, "open access log (%s)", wp->config->access_log); in fpm_log_open()
52 dup2(fd, wp->log_fd); in fpm_log_open()
54 fd = wp->log_fd; in fpm_log_open()
57 wp->log_fd = fd; in fpm_log_open()
70 int fpm_log_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ in fpm_log_init_child() argument
72 if (!wp || !wp->config) { in fpm_log_init_child()
76 if (wp->config->access_log && *wp->config->access_log) { in fpm_log_init_child()
77 if (wp->config->access_format) { in fpm_log_init_child()
78 fpm_log_format = strdup(wp->config->access_format); in fpm_log_init_child()
83 fpm_log_fd = wp->log_fd; in fpm_log_init_child()
87 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_log_init_child()
88 if (wp->log_fd > -1 && wp->log_fd != fpm_log_fd) { in fpm_log_init_child()
89 close(wp->log_fd); in fpm_log_init_child()
90 wp->log_fd = -1; in fpm_log_init_child()