fpm_init
2015-11-04 14:23:07 0 举报
`fpm_init`是一个函数或方法,通常用于初始化FPM(FastCGI Process Manager)进程。FPM是一个PHP应用程序的进程管理器,它允许在独立的进程中运行PHP脚本,从而提高了应用程序的性能和稳定性。`fpm_init`函数的主要作用是创建一个新的FPM进程,并为其分配内存、文件描述符等资源。在初始化过程中,还可以设置一些参数,如工作目录、环境变量等。一旦`fpm_init`成功执行,新的FPM进程将开始监听指定的端口,等待来自Web服务器的请求。通过使用`fpm_init`,开发者可以更方便地管理和控制PHP应用程序的运行环境,提高应用程序的可扩展性和可靠性。
作者其他创作
大纲/内容
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);
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\");
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\
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()
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;
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;
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);
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())
fpm_event_pre_init(fpm_global_config.events_mechanism)
c-type = type;c-cleanup = cleanup;c-arg = arg;
0 条评论
下一页