echo "end!<br>\n";
?>
---- php-5.4.0alpha2/sapi/cgi/cgi_main.c~ 2011-08-05 13:26:14.000000000 +0300
-+++ php-5.4.0alpha2/sapi/cgi/cgi_main.c 2011-08-05 13:57:17.564708456 +0300
+--- php-7.1.0alpha2/sapi/cgi/cgi_main.c~ 2016-07-04 14:56:49.000000000 +0300
++++ php-7.1.0alpha2/sapi/cgi/cgi_main.c 2016-07-04 14:58:17.522958766 +0300
@@ -101,6 +101,9 @@
*/
static int parent = 1;
fcgi_request *request = NULL;
int repeats = 1;
int benchmark = 0;
-@@ -1579,9 +1596,13 @@
- parent = 0;
+@@ -2080,9 +2080,14 @@
+ parent = 0;
- /* don't catch our signals */
-- sigaction(SIGTERM, &old_term, 0);
- sigaction(SIGQUIT, &old_quit, 0);
- sigaction(SIGINT, &old_int, 0);
+ /* don't catch our signals */
+- sigaction(SIGTERM, &old_term, 0);
+ sigaction(SIGQUIT, &old_quit, 0);
+ sigaction(SIGINT, &old_int, 0);
+
-+ /* call graceful shutdown handler for SIGTERM */
-+ act.sa_flags = 0;
-+ act.sa_handler = fastcgi_graceful_shutdown;
-+ sigaction(SIGTERM, &act, &old_term);
- break;
- case -1:
- perror("php (pre-forking)");
++ /* call graceful shutdown handler for SIGTERM */
++ act.sa_flags = 0;
++ act.sa_handler = fastcgi_graceful_shutdown;
++ sigaction(SIGTERM, &act, &old_term);
++
+ zend_signal_init();
+ break;
+ case -1: