Re: PHP 5.3.3 and new fpm sapi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Once started, php-fpm then responds to several POSIX signals:
>              SIGUSR2             graceful reload of all workers + reload of fpm conf/binary

here is patch for php-fpm.init to allow graceful reload of workers

--
All bugs reserved
Index: php-fpm.init
===================================================================
--- php-fpm.init	(revision 38)
+++ php-fpm.init	(working copy)
@@ -47,7 +47,14 @@
         start
 }
 
+reload () {
+	echo -n $"Reloading $prog: "
+	killproc -p ${pidfile} php-fpm -USR2
+	RETVAL=$?
+	echo
+}
 
+
 # See how we were called.
 case "$1" in
   start)
@@ -60,9 +67,12 @@
 	status -p ${pidfile} php-fpm
 	RETVAL=$?
 	;;
-  restart|reload|force-reload)
+  restart)
 	restart
 	;;
+  reload|force-reload)
+	reload
+	;;
   condrestart|try-restart)
 	[ -f ${lockfile} ] && restart || :
 	;;
_______________________________________________
php-devel mailing list
php-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/php-devel

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora KDE]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux