fpm_init
2015-11-04 14:23:07 0 举报
`fpm_init`是一个函数或方法,通常用于初始化FPM(FastCGI Process Manager)进程。FPM是一个PHP的扩展,它提供了一种方式来管理PHP进程,使得PHP可以作为独立的进程在服务器上运行。`fpm_init`函数的主要作用是创建一个新的FPM进程,或者如果已经存在一个FPM进程,那么它将连接到这个已经存在的进程。这个函数通常需要一些参数,如进程ID、IP地址、端口号等,以便正确地初始化FPM进程。在初始化完成后,可以通过其他函数或方法来控制和管理这个FPM进程,如启动、停止、重启等。
作者其他创作
大纲/内容
if (0 fpm_stdio_open_error_log(0))
static int fpm_conf_post_process(int force_daemon TSRMLS_DC)
struct fpm_event_module_s *fpm_event_epoll_module()
PHP_FUNCTION(openlog);
#if HAVE_SELECT return &select_module;#else return NULL;
int zlog_set_fd(int new_fd)
int fpm_event_pre_init(char *machanism)
if (fpm_globals.config == NULL)
zlog_fd = new_fd;
int fd = open(\"/dev/null\
int zlog_set_level(int new_value)
f (force_daemon = 0) {/* forced from command line options */fpm_global_config.daemonize = force_daemon;fpm_globals.log_level = fpm_global_config.log_level;zlog_set_level(fpm_globals.log_level);if (fpm_global_config.process_max 0) {if (fpm_global_config.process_priority != 64 && (fpm_global_config.process_priority 20)) {if (!fpm_global_config.error_log) {fpm_global_config.error_log = strdup(\"log/php-fpm.log\");
struct fpm_event_module_s *fpm_event_poll_module()
#if HAVE_DEVPOLL return &devpoll_module;#else return NULL;
N
ret = fpm_conf_load_ini_file(fpm_globals.config TSRMLS_CC);
if (!fpm_global_config.syslog_ident) {fpm_global_config.syslog_ident = strdup(\"php-fpm\
if (fpm_globals.prefix && *fpm_globals.prefix) {if (!fpm_conf_is_dir(fpm_globals.prefix)) {
static inline int fpm_use_error_log()
static inline void *fpm_array_push(struct fpm_array_s *a)
#if HAVE_EPOLLreturn &epoll_module;#else return NULL;
/** Return the module configuration*/ struct fpm_event_module_s *fpm_event_kqueue_module()
fpm_stdio_init_main()
struct fpm_event_module_s *fpm_event_devpoll_module()
zlog_level = new_value;
fpm_php_init_main()
struct fpm_event_module_s *fpm_event_port_module()
int fpm_stdio_init_main()
int fpm_php_init_main()
ret = (char *) a-data + a-sz * n; return ret;
int fpm_systemd_conf()
int fpm_conf_load_ini_file(char *filename TSRMLS_DC)
TSRMLS_FETCH();php_module_shutdown(TSRMLS_C);sapi_shutdown();
#if HAVE_PORTreturn &port_module;#else return NULL;
struct fpm_event_module_s *fpm_event_select_module()
#if HAVE_POLL return &poll_module;#else return NULL;
fpm_conf_post_process(force_daemon TSRMLS_CC)
fpm_globals.argc = argc;fpm_globals.argv = argv;if (config && *config) {fpm_globals.config = strdup(config);} fpm_globals.prefix = prefix;fpm_globals.pid = pid;fpm_globals.run_as_root = run_as_root;fpm_globals.force_stderr = force_stderr;
static int fpm_conf_is_dir(char *path)
int fpm_stdio_open_error_log(int reopen)
if (fpm_globals.pid && *fpm_globals.pid) {fpm_global_config.pid_file = strdup(fpm_globals.pid);
struct cleanup_s *c;c = fpm_array_push(&cleanups);
fpm_globals.config = strdup(tmp); efree(tmp);
fpm_conf_process_all_pools()
Y
if (test_conf) {if (test_conf 1) {fpm_conf_dump();fpm_globals.test_successful = 1;
#if HAVE_KQUEUE return &kqueue_module; #else return NULL;
if (0 fpm_systemd_conf())
if (wp && wp-config) {prefix = wp-config-prefix; /* if the wp prefix is not set */if (prefix == NULL) {prefix = fpm_globals.prefix;/* if the global prefix is not set */if (prefix == NULL) {prefix = default_prefix ? default_prefix : PHP_PREFIX;
fpm_event_pre_init(fpm_global_config.events_mechanism)
c-type = type;c-cleanup = cleanup;c-arg = arg;
0 条评论
下一页