Back to index

php5  5.3.10
fpm_worker_pool.h
Go to the documentation of this file.
00001 
00002        /* $Id: fpm_worker_pool.h,v 1.13 2008/08/26 15:09:15 anight Exp $ */
00003        /* (c) 2007,2008 Andrei Nigmatulin */
00004 
00005 #ifndef FPM_WORKER_POOL_H
00006 #define FPM_WORKER_POOL_H 1
00007 
00008 #include "fpm_conf.h"
00009 #include "fpm_shm.h"
00010 
00011 struct fpm_worker_pool_s;
00012 struct fpm_child_s;
00013 struct fpm_child_stat_s;
00014 struct fpm_shm_s;
00015 
00016 enum fpm_address_domain {
00017        FPM_AF_UNIX = 1,
00018        FPM_AF_INET = 2
00019 };
00020 
00021 struct fpm_worker_pool_s {
00022        struct fpm_worker_pool_s *next;
00023        struct fpm_worker_pool_config_s *config;
00024        char *user, *home;                                                           /* for setting env USER and HOME */
00025        enum fpm_address_domain listen_address_domain;
00026        int listening_socket;
00027        int set_uid, set_gid;                                                        /* config uid and gid */
00028        int socket_uid, socket_gid, socket_mode;
00029 
00030        /* runtime */
00031        struct fpm_child_s *children;
00032        int running_children;
00033        int idle_spawn_rate;
00034        int warn_max_children;
00035 #if 0
00036        int warn_lq;
00037 #endif
00038        struct fpm_scoreboard_s *scoreboard;
00039        int log_fd;
00040        char **limit_extensions;
00041 
00042        /* for ondemand PM */
00043        struct fpm_event_s *ondemand_event;
00044        int socket_event_set;
00045 };
00046 
00047 struct fpm_worker_pool_s *fpm_worker_pool_alloc();
00048 int fpm_worker_pool_init_main();
00049 
00050 extern struct fpm_worker_pool_s *fpm_worker_all_pools;
00051 
00052 #endif
00053