In my opinion there should be configtest() at the begining of reload() in /etc/init.d/php-fpm just like in /etc/init.d/nginx reload() { configtest || return 1 ebegin "Reloading PHP FastCGI Process Manager" set_phpvars [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID}) eend $? } configtest() { ebegin "Checking PHP FastCGI configuration" set_phpvars /usr/lib/${PHPSLOT}/bin/php-fpm -y "${PHP_FPM_CONF}" -t &> /dev/null if [ $? -ne 0 ]; then /usr/lib/${PHPSLOT}/bin/php-fpm -y "${PHP_FPM_CONF}" -t fi eend $? "failed, please correct errors above" } This way you could avoid reloading FPM when modified config has for example syntax error which causes FPM to stop working and requires /etc/init.d/php-fpm restart. Reproducible: Always Steps to Reproduce: 1. change php-fpm.conf to contain error, like syntax 2. /etc/init.d/php-fpm reload Actual Results: FPM dead Expected Results: Configuration checked, no kill -USR2 executed.
Which version of dev-lang/php is this?
5.5.4
This should be fixed, thanks for the suggestion! I added the same line before start() so that, if the config is bad, you don't have to wait five seconds. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0709457d61898989510adfa26c4cb615f18165b