diff options
author | Anatol Belski <ab@php.net> | 2018-03-27 14:21:42 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-03-27 14:21:42 +0200 |
commit | 5e00c15b88ee6b5e3132646dadfeb3283abf993a (patch) | |
tree | deeac92a17cbacbedea12a00111b8cd9b12c4a03 /sapi/fpm/fpm | |
parent | 6cce3548f1abee6813809331c7028310ece75b89 (diff) | |
parent | 600b6277f8928f1dc97e3f79b95b112e9aa66cbc (diff) | |
download | php-git-5e00c15b88ee6b5e3132646dadfeb3283abf993a.tar.gz |
Merge branch 'PHP-7.2'
* PHP-7.2:
Do not set PR_SET_DUMPABLE by default
Do not set PR_SET_DUMPABLE by default
Diffstat (limited to 'sapi/fpm/fpm')
-rw-r--r-- | sapi/fpm/fpm/fpm_conf.c | 3 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_conf.h | 1 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_unix.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fpm_conf.c b/sapi/fpm/fpm/fpm_conf.c index 8ab120a4b6..b93cd15fe7 100644 --- a/sapi/fpm/fpm/fpm_conf.c +++ b/sapi/fpm/fpm/fpm_conf.c @@ -132,6 +132,7 @@ static struct ini_value_parser_s ini_fpm_pool_options[] = { { "listen.mode", &fpm_conf_set_string, WPO(listen_mode) }, { "listen.allowed_clients", &fpm_conf_set_string, WPO(listen_allowed_clients) }, { "process.priority", &fpm_conf_set_integer, WPO(process_priority) }, + { "process.dumpable", &fpm_conf_set_boolean, WPO(process_dumpable) }, { "pm", &fpm_conf_set_pm, WPO(pm) }, { "pm.max_children", &fpm_conf_set_integer, WPO(pm_max_children) }, { "pm.start_servers", &fpm_conf_set_integer, WPO(pm_start_servers) }, @@ -614,6 +615,7 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */ wp->config->listen_backlog = FPM_BACKLOG_DEFAULT; wp->config->pm_process_idle_timeout = 10; /* 10s by default */ wp->config->process_priority = 64; /* 64 means unset */ + wp->config->process_dumpable = 0; wp->config->clear_env = 1; if (!fpm_worker_all_pools) { @@ -1646,6 +1648,7 @@ static void fpm_conf_dump() /* {{{ */ } else { zlog(ZLOG_NOTICE, "\tprocess.priority = %d", wp->config->process_priority); } + zlog(ZLOG_NOTICE, "\tprocess.dumpable = %s", BOOL2STR(wp->config->process_dumpable)); zlog(ZLOG_NOTICE, "\tpm = %s", PM2STR(wp->config->pm)); zlog(ZLOG_NOTICE, "\tpm.max_children = %d", wp->config->pm_max_children); zlog(ZLOG_NOTICE, "\tpm.start_servers = %d", wp->config->pm_start_servers); diff --git a/sapi/fpm/fpm/fpm_conf.h b/sapi/fpm/fpm/fpm_conf.h index d56fcc4e78..a0434b694d 100644 --- a/sapi/fpm/fpm/fpm_conf.h +++ b/sapi/fpm/fpm/fpm_conf.h @@ -64,6 +64,7 @@ struct fpm_worker_pool_config_s { char *listen_mode; char *listen_allowed_clients; int process_priority; + int process_dumpable; int pm; int pm_max_children; int pm_start_servers; diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c index 6089e3109e..44f8df3111 100644 --- a/sapi/fpm/fpm/fpm_unix.c +++ b/sapi/fpm/fpm/fpm_unix.c @@ -398,7 +398,7 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */ } #ifdef HAVE_PRCTL - if (0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) { + if (wp->config->process_dumpable && 0 > prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)) { zlog(ZLOG_SYSERROR, "[pool %s] failed to prctl(PR_SET_DUMPABLE)", wp->config->name); } #endif |