summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2013-06-16 16:55:18 -0700
committerStanislav Malyshev <stas@php.net>2013-06-16 16:56:29 -0700
commita770ae36c2ce25fd576557d63ceb244d80f9289d (patch)
treee5d4b9dc01ea8a4f7964fb5cbf0752bbd63bb2f7
parent44822a7166ba17029e682c1fe0be270c2f076f0a (diff)
parentee01af7df149da2c511b0f91db2e161eebb2bf58 (diff)
downloadphp-git-a770ae36c2ce25fd576557d63ceb244d80f9289d.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix bug #64764: Add status option to fpm init.d script
-rw-r--r--NEWS3
-rw-r--r--sapi/fpm/init.d.php-fpm.in16
2 files changed, 18 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5ac86613c7..d10d3f69d2 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,9 @@ PHP NEWS
. Fixed bug #64166 (quoted-printable-encode stream filter incorrectly
discarding whitespace). (Michael M Slusarz)
+- FPM:
+ . Implemented FR #64764 (add support for FPM init.d script). (Lior Kaplan)
+
- PDO:
. Fixed bug #63176 (Segmentation fault when instantiate 2 persistent PDO to
the same db server). (Laruence)
diff --git a/sapi/fpm/init.d.php-fpm.in b/sapi/fpm/init.d.php-fpm.in
index 49cce79ae9..020b942f14 100644
--- a/sapi/fpm/init.d.php-fpm.in
+++ b/sapi/fpm/init.d.php-fpm.in
@@ -91,6 +91,20 @@ case "$1" in
fi
;;
+ status)
+ if [ ! -r $php_fpm_PID ] ; then
+ echo "php-fpm is stopped"
+ exit 0
+ fi
+
+ PID=`cat $php_fpm_PID`
+ if ps -p $PID | grep -q $PID; then
+ echo "php-fpm (pid $PID) is running..."
+ else
+ echo "php-fpm dead but pid file exists"
+ fi
+ ;;
+
force-quit)
echo -n "Terminating php-fpm "
@@ -131,7 +145,7 @@ case "$1" in
;;
*)
- echo "Usage: $0 {start|stop|force-quit|restart|reload}"
+ echo "Usage: $0 {start|stop|force-quit|restart|reload|status}"
exit 1
;;