Home
last modified time | relevance | path

Searched refs:wp (Results 1 – 25 of 32) sorted by relevance

12

/PHP-5.4/sapi/fpm/fpm/
H A Dfpm_unix.c81 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
83 wp->set_uid = strtoul(wp->config->user, 0, 10); in fpm_unix_conf_wp()
101 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
103 wp->set_gid = strtoul(wp->config->group, 0, 10); in fpm_unix_conf_wp()
117 if (wp->set_uid == 0 || wp->set_gid == 0) { in fpm_unix_conf_wp()
123 if (wp->config->user && *wp->config->user) { in fpm_unix_conf_wp()
126 if (wp->config->group && *wp->config->group) { in fpm_unix_conf_wp()
129 if (wp->config->chroot && *wp->config->chroot) { in fpm_unix_conf_wp()
180 if (wp->config->chdir && *wp->config->chdir) { in fpm_unix_init_child()
205 if (0 > initgroups(wp->config->user, wp->set_gid)) { in fpm_unix_init_child()
[all …]
H A Dfpm_process_ctl.c151 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_pctl_kill_all()
296 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_pctl_check_request_timeout()
314 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_pctl_perform_idle_server_maintenance()
346 if (!wp->warn_lq) { in fpm_pctl_perform_idle_server_maintenance()
348 wp->warn_lq = 1; in fpm_pctl_perform_idle_server_maintenance()
351 wp->warn_lq = 0; in fpm_pctl_perform_idle_server_maintenance()
384 wp->idle_spawn_rate = 1; in fpm_pctl_perform_idle_server_maintenance()
389 if (wp->running_children >= wp->config->pm_max_children) { in fpm_pctl_perform_idle_server_maintenance()
436 wp->idle_spawn_rate = 1; in fpm_pctl_perform_idle_server_maintenance()
508 wp->socket_event_set = 0; in fpm_pctl_on_socket_accept()
[all …]
H A Dfpm_children.c91 struct fpm_worker_pool_s *wp = child->wp; in fpm_child_link() local
93 ++wp->running_children; in fpm_child_link()
96 child->next = wp->children; in fpm_child_link()
101 wp->children = child; in fpm_child_link()
127 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_child_find()
237 struct fpm_worker_pool_s *wp = child->wp; in fpm_children_bury() local
312 c->wp = wp; in fpm_resources_prepare()
341 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_child_resources_use()
342 if (wp == child->wp) { in fpm_child_resources_use()
407 fpm_child_init(wp); in fpm_children_make()
[all …]
H A Dfpm_worker_pool.c23 if (wp->config) { in fpm_worker_pool_free()
24 free(wp->config); in fpm_worker_pool_free()
26 if (wp->user) { in fpm_worker_pool_free()
27 free(wp->user); in fpm_worker_pool_free()
29 if (wp->home) { in fpm_worker_pool_free()
30 free(wp->home); in fpm_worker_pool_free()
32 free(wp); in fpm_worker_pool_free()
40 for (wp = fpm_worker_all_pools; wp; wp = wp_next) { in fpm_worker_pool_cleanup()
41 wp_next = wp->next; in fpm_worker_pool_cleanup()
43 fpm_children_free(wp->children); in fpm_worker_pool_cleanup()
[all …]
H A Dfpm_conf.c592 if (!wp) { in fpm_worker_pool_config_alloc()
682 if (wp && wp->config) { in fpm_evaluate_full_path()
726 if (**path != '/' && wp != NULL && wp->config) { in fpm_evaluate_full_path()
742 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_conf_process_all_pools()
745 if (wp->config->prefix && *wp->config->prefix) { in fpm_conf_process_all_pools()
962 if (wp->config->chroot && *wp->config->chroot) { in fpm_conf_process_all_pools()
978 if (wp->config->chdir && *wp->config->chdir) { in fpm_conf_process_all_pools()
1085 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_conf_process_all_pools()
1208 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_conf_post_process()
1305 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_conf_ini_parser_section()
[all …]
H A Dfpm_sockets.c183 if (wp->listen_address_domain == FPM_AF_UNIX) { in fpm_sockets_new_listening_socket()
190 saved_umask = umask(0777 ^ wp->socket_mode); in fpm_sockets_new_listening_socket()
202 if (wp->listen_address_domain == FPM_AF_UNIX) { in fpm_sockets_new_listening_socket()
207 if (wp->socket_uid != -1 || wp->socket_gid != -1) { in fpm_sockets_new_listening_socket()
208 if (0 > chown(path, wp->socket_uid, wp->socket_gid)) { in fpm_sockets_new_listening_socket()
311 struct fpm_worker_pool_s *wp; in fpm_sockets_init_main() local
346 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_sockets_init_main()
347 switch (wp->listen_address_domain) { in fpm_sockets_init_main()
349 wp->listening_socket = fpm_socket_af_inet_listening_socket(wp); in fpm_sockets_init_main()
356 wp->listening_socket = fpm_socket_af_unix_listening_socket(wp); in fpm_sockets_init_main()
[all …]
H A Dfpm_env.c146 if (wp->config->clear_env) { in fpm_env_init_child()
154 if (wp->user) { in fpm_env_init_child()
155 setenv("USER", wp->user, 1); in fpm_env_init_child()
158 if (wp->home) { in fpm_env_init_child()
159 setenv("HOME", wp->home, 1); in fpm_env_init_child()
185 free(wp->user); in fpm_env_conf_wp()
186 wp->user = 0; in fpm_env_conf_wp()
190 free(wp->home); in fpm_env_conf_wp()
191 wp->home = 0; in fpm_env_conf_wp()
201 struct fpm_worker_pool_s *wp; in fpm_env_init_main() local
[all …]
H A Dfpm_scoreboard.c27 struct fpm_worker_pool_s *wp; in fpm_scoreboard_init_main() local
44 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_scoreboard_init_main()
45 if (wp->config->pm_max_children < 1) { in fpm_scoreboard_init_main()
50 if (wp->scoreboard) { in fpm_scoreboard_init_main()
56 if (!wp->scoreboard) { in fpm_scoreboard_init_main()
59 wp->scoreboard->nprocs = wp->config->pm_max_children; in fpm_scoreboard_init_main()
60 for (i = 0; i < wp->scoreboard->nprocs; i++) { in fpm_scoreboard_init_main()
62 if (!wp->scoreboard->procs[i]) { in fpm_scoreboard_init_main()
68 wp->scoreboard->pm = wp->config->pm; in fpm_scoreboard_init_main()
69 wp->scoreboard->start_epoch = time(NULL); in fpm_scoreboard_init_main()
[all …]
H A Dfpm_systemd.c17 struct fpm_worker_pool_s *wp; in fpm_systemd() local
22 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_systemd()
23 if (wp->scoreboard) { in fpm_systemd()
24 active += wp->scoreboard->active; in fpm_systemd()
25 idle += wp->scoreboard->idle; in fpm_systemd()
26 requests += wp->scoreboard->requests; in fpm_systemd()
27 slow_req += wp->scoreboard->slow_rq; in fpm_systemd()
H A Dfpm_log.c39 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { 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()
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()
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()
[all …]
H A Dfpm_php.c117 static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp) /* {{{ */ in fpm_php_apply_defines() argument
121 for (kv = wp->config->php_values; kv; kv = kv->next) { in fpm_php_apply_defines()
127 for (kv = wp->config->php_admin_values; kv; kv = kv->next) { in fpm_php_apply_defines()
138 if (wp->listen_address_domain == FPM_AF_INET) { in fpm_php_set_allowed_clients()
139 fcgi_set_allowed_clients(wp->config->listen_allowed_clients); in fpm_php_set_allowed_clients()
146 static int fpm_php_set_fcgi_mgmt_vars(struct fpm_worker_pool_s *wp) /* {{{ */
219 int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ in fpm_php_init_child() argument
221 if (0 > fpm_php_apply_defines(wp) || in fpm_php_init_child()
222 0 > fpm_php_set_allowed_clients(wp)) { in fpm_php_init_child()
226 if (wp->limit_extensions) { in fpm_php_init_child()
[all …]
H A Dfpm.c93 struct fpm_worker_pool_s *wp; in fpm_run() local
96 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_run()
99 is_parent = fpm_children_create_initial(wp); in fpm_run()
H A Dfpm_children.h14 int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
18 int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to_spawn, int is_debu…
25 struct fpm_worker_pool_s *wp; member
H A Dfpm_status.c25 int fpm_status_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ in fpm_status_init_child() argument
27 if (!wp || !wp->config) { in fpm_status_init_child()
32 if (wp->config->pm_status_path) { in fpm_status_init_child()
33 fpm_status_uri = strdup(wp->config->pm_status_path); in fpm_status_init_child()
36 if (wp->config->ping_path) { in fpm_status_init_child()
37 if (!wp->config->ping_response) { in fpm_status_init_child()
38 …RROR, "[pool %s] ping is set (%s) but ping.response is not set.", wp->config->name, wp->config->pi… in fpm_status_init_child()
41 fpm_status_ping_uri = strdup(wp->config->ping_path); in fpm_status_init_child()
42 fpm_status_ping_response = strdup(wp->config->ping_response); in fpm_status_init_child()
H A Dfpm_stdio.c63 int fpm_stdio_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ in fpm_stdio_init_child() argument
76 if (wp->listening_socket != STDIN_FILENO) { in fpm_stdio_init_child()
77 if (0 > dup2(wp->listening_socket, STDIN_FILENO)) { in fpm_stdio_init_child()
166 zlog(ZLOG_WARNING, "[pool %s] child %d said into %s: \"%s\"%s", child->wp->config->name, in fpm_stdio_child_said()
185 if (0 == child->wp->config->catch_workers_output) { /* not required */ in fpm_stdio_prepare_pipes()
215 if (0 == child->wp->config->catch_workers_output) { /* not required */ in fpm_stdio_parent_use_pipes()
236 if (0 == child->wp->config->catch_workers_output) { /* not required */ in fpm_stdio_discard_pipes()
251 if (child->wp->config->catch_workers_output) { in fpm_stdio_child_use_pipes()
H A Dfpm_unix.h10 int fpm_unix_resolve_socket_premissions(struct fpm_worker_pool_s *wp);
11 int fpm_unix_init_child(struct fpm_worker_pool_s *wp);
H A Dfpm_php_trace.c57 fprintf(slowlog, "\n%s [pool %s] pid %d\n", buf, child->wp->config->name, (int) pid); in fpm_php_trace_dump()
141 fpm_scoreboard_update(0, 0, 0, 0, 0, 0, 1, FPM_SCOREBOARD_ACTION_SET, child->wp->scoreboard); in fpm_php_trace()
146 slowlog = fopen(child->wp->config->slowlog, "a+"); in fpm_php_trace()
149 zlog(ZLOG_SYSERROR, "unable to open slowlog (%s)", child->wp->config->slowlog); in fpm_php_trace()
H A Dfpm_events.c310 struct fpm_worker_pool_s *wp; in fpm_event_init_main() local
325 for (wp = fpm_worker_all_pools; wp; wp = wp->next) { in fpm_event_init_main()
326 if (!wp->config) continue; in fpm_event_init_main()
327 if (wp->config->catch_workers_output && wp->config->pm_max_children > 0) { in fpm_event_init_main()
328 max += (wp->config->pm_max_children * 2); in fpm_event_init_main()
H A Dfpm_log.h9 int fpm_log_init_child(struct fpm_worker_pool_s *wp);
H A Dfpm_request.c234 proc_p = fpm_scoreboard_proc_acquire(child->wp->scoreboard, child->scoreboard_i, 1); in fpm_request_check_timed_out()
270 …child->wp->config->name, (int) child->pid, purified_script_filename, proc.request_method, proc.req… in fpm_request_check_timed_out()
280 …child->wp->config->name, (int) child->pid, purified_script_filename, proc.request_method, proc.req… in fpm_request_check_timed_out()
292 proc = fpm_scoreboard_proc_get(child->wp->scoreboard, child->scoreboard_i); in fpm_request_is_idle()
307 proc = fpm_scoreboard_proc_get(child->wp->scoreboard, child->scoreboard_i); in fpm_request_last_activity()
H A Dfpm_env.h12 int fpm_env_init_child(struct fpm_worker_pool_s *wp);
H A Dfpm_stdio.h12 int fpm_stdio_init_child(struct fpm_worker_pool_s *wp);
H A Dfpm_php.h36 int fpm_php_init_child(struct fpm_worker_pool_s *wp);
H A Dfpm_worker_pool.h48 void fpm_worker_pool_free(struct fpm_worker_pool_s *wp);
H A Dfpm_status.h24 int fpm_status_init_child(struct fpm_worker_pool_s *wp);

Completed in 120 milliseconds

12