X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=php-fpm.patch;h=2d8e385d94f5be7b334a0f9aae8b6d586c18fb12;hb=81e3421d05e0ce6c1b8bb68eb65230f249a51bb1;hp=c5f39c6d9ef90cd5a8aee1819df547148141acf8;hpb=3bba13fbe3c04c8ca987baba3fc004af93b4ac41;p=packages%2Fphp.git diff --git a/php-fpm.patch b/php-fpm.patch index c5f39c6..2d8e385 100644 --- a/php-fpm.patch +++ b/php-fpm.patch @@ -1,8 +1,10 @@ -diff -Nru php-5.2.8.vanilla/configure php-5.2.8.fpm/configure -diff -Nru php-5.2.8.vanilla/configure.in php-5.2.8.fpm/configure.in ---- php-5.2.8.vanilla/configure.in 2008-12-07 22:23:25.000000000 +0300 -+++ php-5.2.8.fpm/configure.in 2008-12-09 04:00:14.000000000 +0300 -@@ -297,6 +297,12 @@ +diff --git a/configure b/configure +index 2d88ed7..c490abf 100755 +diff --git a/configure.in b/configure.in +index e181ac9..4424930 100644 +--- a/configure.in ++++ b/configure.in +@@ -295,6 +295,12 @@ if test "$enable_maintainer_zts" = "yes"; then PTHREADS_FLAGS fi @@ -15,7 +17,7 @@ diff -Nru php-5.2.8.vanilla/configure.in php-5.2.8.fpm/configure.in divert(3) dnl ## In diversion 3 we check for compile-time options to the PHP -@@ -514,6 +520,7 @@ +@@ -511,6 +517,7 @@ AC_CHECK_FUNCS( alphasort \ asctime_r \ chroot \ @@ -23,7 +25,7 @@ diff -Nru php-5.2.8.vanilla/configure.in php-5.2.8.fpm/configure.in ctime_r \ cuserid \ crypt \ -@@ -1239,6 +1246,8 @@ +@@ -1253,6 +1260,8 @@ PHP_SUBST_OLD(EXTENSION_DIR) PHP_SUBST_OLD(EXTRA_LDFLAGS) PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM) PHP_SUBST_OLD(EXTRA_LIBS) @@ -32,7 +34,7 @@ diff -Nru php-5.2.8.vanilla/configure.in php-5.2.8.fpm/configure.in PHP_SUBST_OLD(ZEND_EXTRA_LIBS) PHP_SUBST_OLD(INCLUDES) PHP_SUBST_OLD(EXTRA_INCLUDES) -@@ -1351,7 +1360,7 @@ +@@ -1364,7 +1373,7 @@ case $PHP_SAPI in install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" ;; *) @@ -41,50 +43,132 @@ diff -Nru php-5.2.8.vanilla/configure.in php-5.2.8.fpm/configure.in ;; esac -diff -Nru php-5.2.8.vanilla/libevent/aclocal.m4 php-5.2.8.fpm/libevent/aclocal.m4 -diff -Nru php-5.2.8.vanilla/libevent/autogen.sh php-5.2.8.fpm/libevent/autogen.sh -diff -Nru php-5.2.8.vanilla/libevent/buffer.c php-5.2.8.fpm/libevent/buffer.c -diff -Nru php-5.2.8.vanilla/libevent/ChangeLog php-5.2.8.fpm/libevent/ChangeLog -diff -Nru php-5.2.8.vanilla/libevent/compat/sys/queue.h php-5.2.8.fpm/libevent/compat/sys/queue.h -diff -Nru php-5.2.8.vanilla/libevent/compat/sys/_time.h php-5.2.8.fpm/libevent/compat/sys/_time.h -diff -Nru php-5.2.8.vanilla/libevent/config.h.in php-5.2.8.fpm/libevent/config.h.in -diff -Nru php-5.2.8.vanilla/libevent/configure php-5.2.8.fpm/libevent/configure -diff -Nru php-5.2.8.vanilla/libevent/configure.in php-5.2.8.fpm/libevent/configure.in -diff -Nru php-5.2.8.vanilla/libevent/depcomp php-5.2.8.fpm/libevent/depcomp -diff -Nru php-5.2.8.vanilla/libevent/devpoll.c php-5.2.8.fpm/libevent/devpoll.c -diff -Nru php-5.2.8.vanilla/libevent/epoll.c php-5.2.8.fpm/libevent/epoll.c -diff -Nru php-5.2.8.vanilla/libevent/epoll_sub.c php-5.2.8.fpm/libevent/epoll_sub.c -diff -Nru php-5.2.8.vanilla/libevent/evbuffer.c php-5.2.8.fpm/libevent/evbuffer.c -diff -Nru php-5.2.8.vanilla/libevent/event.3 php-5.2.8.fpm/libevent/event.3 -diff -Nru php-5.2.8.vanilla/libevent/event.c php-5.2.8.fpm/libevent/event.c -diff -Nru php-5.2.8.vanilla/libevent/event-config.h php-5.2.8.fpm/libevent/event-config.h -diff -Nru php-5.2.8.vanilla/libevent/event-fpm.h php-5.2.8.fpm/libevent/event-fpm.h -diff -Nru php-5.2.8.vanilla/libevent/event.h php-5.2.8.fpm/libevent/event.h -diff -Nru php-5.2.8.vanilla/libevent/event-internal.h php-5.2.8.fpm/libevent/event-internal.h -diff -Nru php-5.2.8.vanilla/libevent/evhttp.h php-5.2.8.fpm/libevent/evhttp.h -diff -Nru php-5.2.8.vanilla/libevent/evport.c php-5.2.8.fpm/libevent/evport.c -diff -Nru php-5.2.8.vanilla/libevent/evsignal.h php-5.2.8.fpm/libevent/evsignal.h -diff -Nru php-5.2.8.vanilla/libevent/evutil.c php-5.2.8.fpm/libevent/evutil.c -diff -Nru php-5.2.8.vanilla/libevent/evutil.h php-5.2.8.fpm/libevent/evutil.h -diff -Nru php-5.2.8.vanilla/libevent/http.c php-5.2.8.fpm/libevent/http.c -diff -Nru php-5.2.8.vanilla/libevent/http-internal.h php-5.2.8.fpm/libevent/http-internal.h -diff -Nru php-5.2.8.vanilla/libevent/install-sh php-5.2.8.fpm/libevent/install-sh -diff -Nru php-5.2.8.vanilla/libevent/kqueue.c php-5.2.8.fpm/libevent/kqueue.c -diff -Nru php-5.2.8.vanilla/libevent/log.c php-5.2.8.fpm/libevent/log.c -diff -Nru php-5.2.8.vanilla/libevent/log.h php-5.2.8.fpm/libevent/log.h -diff -Nru php-5.2.8.vanilla/libevent/Makefile.am php-5.2.8.fpm/libevent/Makefile.am -diff -Nru php-5.2.8.vanilla/libevent/Makefile.in php-5.2.8.fpm/libevent/Makefile.in -diff -Nru php-5.2.8.vanilla/libevent/min_heap.h php-5.2.8.fpm/libevent/min_heap.h -diff -Nru php-5.2.8.vanilla/libevent/missing php-5.2.8.fpm/libevent/missing -diff -Nru php-5.2.8.vanilla/libevent/poll.c php-5.2.8.fpm/libevent/poll.c -diff -Nru php-5.2.8.vanilla/libevent/README php-5.2.8.fpm/libevent/README -diff -Nru php-5.2.8.vanilla/libevent/select.c php-5.2.8.fpm/libevent/select.c -diff -Nru php-5.2.8.vanilla/libevent/signal.c php-5.2.8.fpm/libevent/signal.c -diff -Nru php-5.2.8.vanilla/libevent/strlcpy.c php-5.2.8.fpm/libevent/strlcpy.c -diff -Nru php-5.2.8.vanilla/libevent/strlcpy-internal.h php-5.2.8.fpm/libevent/strlcpy-internal.h -diff -Nru php-5.2.8.vanilla/main/php_config.h.in php-5.2.8.fpm/main/php_config.h.in ---- php-5.2.8.vanilla/main/php_config.h.in 2008-12-07 22:31:16.000000000 +0300 -+++ php-5.2.8.fpm/main/php_config.h.in 2008-12-13 07:23:02.000000000 +0300 +diff --git a/libevent/ChangeLog b/libevent/ChangeLog +new file mode 100644 +index 0000000..c592139 +diff --git a/libevent/Makefile.am b/libevent/Makefile.am +new file mode 100644 +index 0000000..5ccfd2c +diff --git a/libevent/Makefile.in b/libevent/Makefile.in +new file mode 100644 +index 0000000..0600dcc +diff --git a/libevent/README b/libevent/README +new file mode 100644 +index 0000000..b065039 +diff --git a/libevent/aclocal.m4 b/libevent/aclocal.m4 +new file mode 100644 +index 0000000..74de4a1 +diff --git a/libevent/autogen.sh b/libevent/autogen.sh +new file mode 100644 +index 0000000..218dbf4 +diff --git a/libevent/buffer.c b/libevent/buffer.c +new file mode 100644 +index 0000000..e66080f +diff --git a/libevent/compat/sys/_time.h b/libevent/compat/sys/_time.h +new file mode 100644 +index 0000000..8cabb0d +diff --git a/libevent/compat/sys/queue.h b/libevent/compat/sys/queue.h +new file mode 100644 +index 0000000..c0956dd +diff --git a/libevent/config.h.in b/libevent/config.h.in +new file mode 100644 +index 0000000..d151f87 +diff --git a/libevent/configure b/libevent/configure +new file mode 100644 +index 0000000..0a74aec +diff --git a/libevent/configure.in b/libevent/configure.in +new file mode 100644 +index 0000000..852d3c5 +diff --git a/libevent/depcomp b/libevent/depcomp +new file mode 100644 +index 0000000..ffcd540 +diff --git a/libevent/devpoll.c b/libevent/devpoll.c +new file mode 100644 +index 0000000..cbd2730 +diff --git a/libevent/epoll.c b/libevent/epoll.c +new file mode 100644 +index 0000000..cf3c859 +diff --git a/libevent/epoll_sub.c b/libevent/epoll_sub.c +new file mode 100644 +index 0000000..431970c +diff --git a/libevent/evbuffer.c b/libevent/evbuffer.c +new file mode 100644 +index 0000000..f2179a5 +diff --git a/libevent/event-config.h b/libevent/event-config.h +new file mode 100644 +index 0000000..0a278b3 +diff --git a/libevent/event-fpm.h b/libevent/event-fpm.h +new file mode 100644 +index 0000000..8625ca5 +diff --git a/libevent/event-internal.h b/libevent/event-internal.h +new file mode 100644 +index 0000000..7485f21 +diff --git a/libevent/event.3 b/libevent/event.3 +new file mode 100644 +index 0000000..5b33ec6 +diff --git a/libevent/event.c b/libevent/event.c +new file mode 100644 +index 0000000..826b7db +diff --git a/libevent/event.h b/libevent/event.h +new file mode 100644 +index 0000000..d67ecb5 +diff --git a/libevent/evhttp.h b/libevent/evhttp.h +new file mode 100644 +index 0000000..0d35f9e +diff --git a/libevent/evport.c b/libevent/evport.c +new file mode 100644 +index 0000000..31523b4 +diff --git a/libevent/evsignal.h b/libevent/evsignal.h +new file mode 100644 +index 0000000..8be9cbd +diff --git a/libevent/evutil.c b/libevent/evutil.c +new file mode 100644 +index 0000000..86205b2 +diff --git a/libevent/evutil.h b/libevent/evutil.h +new file mode 100644 +index 0000000..0a018b8 +diff --git a/libevent/http-internal.h b/libevent/http-internal.h +new file mode 100644 +index 0000000..bc9a1ed +diff --git a/libevent/http.c b/libevent/http.c +new file mode 100644 +index 0000000..1d60fc5 +diff --git a/libevent/install-sh b/libevent/install-sh +new file mode 100644 +index 0000000..1a83534 +diff --git a/libevent/kqueue.c b/libevent/kqueue.c +new file mode 100644 +index 0000000..38a1819 +diff --git a/libevent/log.c b/libevent/log.c +new file mode 100644 +index 0000000..b62a619 +diff --git a/libevent/log.h b/libevent/log.h +new file mode 100644 +index 0000000..7bc6632 +diff --git a/libevent/min_heap.h b/libevent/min_heap.h +new file mode 100644 +index 0000000..d47e563 +diff --git a/libevent/missing b/libevent/missing +new file mode 100644 +index 0000000..09edd88 +diff --git a/libevent/poll.c b/libevent/poll.c +new file mode 100644 +index 0000000..b67c6ff +diff --git a/libevent/select.c b/libevent/select.c +new file mode 100644 +index 0000000..7faafe4 +diff --git a/libevent/signal.c b/libevent/signal.c +new file mode 100644 +index 0000000..bcaa3f9 +diff --git a/libevent/strlcpy-internal.h b/libevent/strlcpy-internal.h +new file mode 100644 +index 0000000..22b5f61 +diff --git a/libevent/strlcpy.c b/libevent/strlcpy.c +new file mode 100644 +index 0000000..a1a413d +diff --git a/main/php_config.h.in b/main/php_config.h.in +--- a/main/php_config.h.in ++++ b/main/php_config.h.in @@ -170,6 +170,9 @@ /* Define if you have the chroot function. */ #undef HAVE_CHROOT @@ -95,7 +179,7 @@ diff -Nru php-5.2.8.vanilla/main/php_config.h.in php-5.2.8.fpm/main/php_config.h /* Define if you have the crypt function. */ #undef HAVE_CRYPT -@@ -932,6 +935,9 @@ +@@ -935,6 +938,9 @@ /* */ #undef PHP_FASTCGI @@ -105,7 +189,7 @@ diff -Nru php-5.2.8.vanilla/main/php_config.h.in php-5.2.8.fpm/main/php_config.h /* */ #undef FORCE_CGI_REDIRECT -@@ -941,6 +947,27 @@ +@@ -944,6 +950,27 @@ /* */ #undef ENABLE_PATHINFO_CHECK @@ -133,9 +217,15 @@ diff -Nru php-5.2.8.vanilla/main/php_config.h.in php-5.2.8.fpm/main/php_config.h /* Define if system uses EBCDIC */ #undef CHARSET_EBCDIC -diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main.c ---- php-5.2.8.vanilla/sapi/cgi/cgi_main.c 2008-11-28 14:56:50.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/cgi_main.c 2008-12-09 07:17:03.000000000 +0300 +--- php-5.2.17/sapi/cgi/Makefile.frag~ 2012-02-27 14:44:23.000000000 +0200 ++++ php-5.2.17/sapi/cgi/Makefile.frag 2012-02-27 14:46:13.037731342 +0200 +@@ -1,2 +1,2 @@ +-$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS) ++$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS) + $(BUILD_CGI) +diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c +--- a/sapi/cgi/cgi_main.c ++++ b/sapi/cgi/cgi_main.c @@ -55,6 +55,9 @@ #if HAVE_SYS_WAIT_H #include @@ -146,7 +236,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #include "zend.h" #include "zend_extensions.h" #include "php_ini.h" -@@ -83,6 +86,11 @@ +@@ -83,6 +86,11 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; #if PHP_FASTCGI #include "fastcgi.h" @@ -158,7 +248,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ -@@ -115,8 +123,12 @@ +@@ -115,8 +123,12 @@ static int parent_waiting = 0; static pid_t pgroup; #endif @@ -171,7 +261,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #define PHP_MODE_STANDARD 1 #define PHP_MODE_HIGHLIGHT 2 #define PHP_MODE_INDENT 3 -@@ -146,6 +158,10 @@ +@@ -146,6 +158,10 @@ static const opt_struct OPTIONS[] = { {'w', 0, "strip"}, {'?', 0, "usage"},/* help alias (both '?' and 'usage') */ {'v', 0, "version"}, @@ -182,7 +272,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. {'z', 1, "zend-extension"}, #if PHP_FASTCGI {'T', 1, "timing"}, -@@ -170,6 +186,7 @@ +@@ -170,6 +186,7 @@ typedef struct _php_cgi_globals_struct { zend_bool impersonate; # endif #endif @@ -190,7 +280,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. } php_cgi_globals_struct; #ifdef ZTS -@@ -471,7 +488,28 @@ +@@ -474,7 +491,28 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) #if PHP_FASTCGI if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); @@ -218,9 +308,9 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. + tmp_read_bytes = read(request_body_fd, buffer + read_bytes, count_bytes - read_bytes); + } } else { - tmp_read_bytes = read(0, buffer + read_bytes, count_bytes - read_bytes); + tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes); } -@@ -783,7 +821,12 @@ +@@ -786,7 +824,12 @@ static void php_cgi_usage(char *argv0) " -s Display colour syntax highlighted source.\n" " -v Version number\n" " -w Display source with stripped comments and whitespace.\n" @@ -234,7 +324,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #if PHP_FASTCGI " -T Measure execution time of script repeated times.\n" #endif -@@ -1231,6 +1274,7 @@ +@@ -1236,6 +1279,7 @@ PHP_INI_BEGIN() # ifdef PHP_WIN32 STD_PHP_INI_ENTRY("fastcgi.impersonate", "0", PHP_INI_SYSTEM, OnUpdateBool, impersonate, php_cgi_globals_struct, php_cgi_globals) # endif @@ -242,7 +332,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #endif PHP_INI_END() -@@ -1253,6 +1297,7 @@ +@@ -1258,6 +1302,7 @@ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals TSRMLS_ # ifdef PHP_WIN32 php_cgi_globals->impersonate = 0; # endif @@ -250,7 +340,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #endif } /* }}} */ -@@ -1285,9 +1330,47 @@ +@@ -1290,9 +1335,47 @@ static PHP_MSHUTDOWN_FUNCTION(cgi) static PHP_MINFO_FUNCTION(cgi) { DISPLAY_INI_ENTRIES(); @@ -298,7 +388,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. static zend_module_entry cgi_module_entry = { STANDARD_MODULE_HEADER, #if PHP_FASTCGI -@@ -1295,7 +1378,7 @@ +@@ -1300,7 +1383,7 @@ static zend_module_entry cgi_module_entry = { #else "cgi", #endif @@ -307,7 +397,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. PHP_MINIT(cgi), PHP_MSHUTDOWN(cgi), NULL, -@@ -1335,6 +1418,7 @@ +@@ -1340,6 +1423,7 @@ int main(int argc, char *argv[]) char *bindpath = NULL; int fcgi_fd = 0; fcgi_request request; @@ -315,7 +405,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. int repeats = 1; int benchmark = 0; #if HAVE_GETTIMEOFDAY -@@ -1455,6 +1539,14 @@ +@@ -1460,6 +1544,14 @@ int main(int argc, char *argv[]) case 's': /* generate highlighted HTML from source */ behavior = PHP_MODE_HIGHLIGHT; break; @@ -330,7 +420,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. } -@@ -1517,6 +1609,19 @@ +@@ -1524,6 +1616,19 @@ consult the installation file that came with this distribution, or visit \n\ #endif /* FORCE_CGI_REDIRECT */ #if PHP_FASTCGI @@ -350,7 +440,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. if (bindpath) { fcgi_fd = fcgi_listen(bindpath, 128); if (fcgi_fd < 0) { -@@ -1531,6 +1636,9 @@ +@@ -1538,6 +1643,9 @@ consult the installation file that came with this distribution, or visit \n\ if (fastcgi) { /* How many times to run PHP scripts before dying */ @@ -360,7 +450,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. if (getenv("PHP_FCGI_MAX_REQUESTS")) { max_requests = atoi(getenv("PHP_FCGI_MAX_REQUESTS")); if (max_requests < 0) { -@@ -1548,6 +1656,9 @@ +@@ -1555,6 +1663,9 @@ consult the installation file that came with this distribution, or visit \n\ #ifndef PHP_WIN32 /* Pre-fork, if required */ @@ -370,7 +460,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. if (getenv("PHP_FCGI_CHILDREN")) { char * children_str = getenv("PHP_FCGI_CHILDREN"); children = atoi(children_str); -@@ -1697,6 +1808,8 @@ +@@ -1704,6 +1815,8 @@ consult the installation file that came with this distribution, or visit \n\ #endif #if PHP_FASTCGI @@ -379,7 +469,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. SG(server_context) = (void *) &request; #else SG(server_context) = (void *) 1; /* avoid server_context==NULL checks */ -@@ -1704,6 +1817,10 @@ +@@ -1711,6 +1824,10 @@ consult the installation file that came with this distribution, or visit \n\ init_request_info(TSRMLS_C); CG(interactive) = 0; @@ -390,7 +480,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. if (!cgi #if PHP_FASTCGI && !fastcgi -@@ -1984,6 +2101,10 @@ +@@ -1994,6 +2111,10 @@ consult the installation file that came with this distribution, or visit \n\ } } @@ -401,7 +491,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. switch (behavior) { case PHP_MODE_STANDARD: php_execute_script(&file_handle TSRMLS_CC); -@@ -2036,6 +2157,10 @@ +@@ -2046,6 +2167,10 @@ consult the installation file that came with this distribution, or visit \n\ #if PHP_FASTCGI fastcgi_request_done: @@ -412,7 +502,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #endif { char *path_translated; -@@ -2049,6 +2174,16 @@ +@@ -2059,6 +2184,16 @@ fastcgi_request_done: SG(request_info).path_translated = path_translated; } @@ -429,7 +519,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. php_request_shutdown((void *) 0); if (exit_status == 0) { exit_status = EG(exit_status); -@@ -2086,15 +2221,20 @@ +@@ -2096,15 +2231,20 @@ fastcgi_request_done: if (bindpath) { free(bindpath); } @@ -454,10 +544,9 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/cgi_main.c php-5.2.8.fpm/sapi/cgi/cgi_main. #endif if (cgi_sapi_module.php_ini_path_override) { -diff -Nru php-5.2.8.vanilla/sapi/cgi/config9.m4 php-5.2.8.fpm/sapi/cgi/config9.m4 ---- php-5.2.8.vanilla/sapi/cgi/config9.m4 2007-07-12 03:20:36.000000000 +0400 -+++ php-5.2.8.fpm/sapi/cgi/config9.m4 2008-07-20 20:46:41.000000000 +0400 -@@ -22,6 +22,10 @@ +--- php-5.2.17/sapi/cgi/config9.m4~ 2012-02-27 14:44:23.000000000 +0200 ++++ php-5.2.17/sapi/cgi/config9.m4 2012-02-27 14:48:07.279580606 +0200 +@@ -22,6 +22,10 @@ PHP_ARG_ENABLE(path-info-check,, [ --disable-path-info-check CGI: If this is disabled, paths such as /info.php/test?a=b will fail to work], yes, no) @@ -468,7 +557,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/config9.m4 php-5.2.8.fpm/sapi/cgi/config9.m dnl dnl CGI setup dnl -@@ -54,6 +58,20 @@ +@@ -54,6 +58,20 @@ if test "$PHP_SAPI" = "default"; then AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_ENABLE_FASTCGI, [ ]) AC_MSG_RESULT($PHP_FASTCGI) @@ -494,7 +583,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/config9.m4 php-5.2.8.fpm/sapi/cgi/config9.m ;; *darwin*) - BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" -+ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(SAPI_EXTRA_LIBS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(SAPI_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ;; *) - BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) libphp_common.la \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" @@ -502,9 +591,9 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/config9.m4 php-5.2.8.fpm/sapi/cgi/config9.m ;; esac -diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c ---- php-5.2.8.vanilla/sapi/cgi/fastcgi.c 2008-10-21 20:43:59.000000000 +0400 -+++ php-5.2.8.fpm/sapi/cgi/fastcgi.c 2008-12-09 04:02:34.000000000 +0300 +diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c +--- a/sapi/cgi/fastcgi.c ++++ b/sapi/cgi/fastcgi.c @@ -27,6 +27,11 @@ #include #include @@ -517,7 +606,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c #ifdef _WIN32 #include -@@ -234,6 +239,8 @@ +@@ -234,6 +239,8 @@ int fcgi_init(void) } else { return is_fastcgi = 0; } @@ -526,7 +615,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c #endif } return is_fastcgi; -@@ -249,12 +256,27 @@ +@@ -249,14 +256,26 @@ int fcgi_is_fastcgi(void) } } @@ -545,17 +634,15 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c if (is_initialized) { zend_hash_destroy(&fcgi_mgmt_vars); } -- is_fastcgi = 0; -+ is_fastcgi = 1; + is_fastcgi = 0; + -+ if (allowed_clients) { -+ free(allowed_clients); + if (allowed_clients) { + free(allowed_clients); + allowed_clients = 0; -+ } + } } - #ifdef _WIN32 -@@ -327,6 +349,41 @@ +@@ -330,6 +349,41 @@ out_fail: } #endif @@ -597,46 +684,46 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c static int is_port_number(const char *bindpath) { while (*bindpath) { -@@ -455,38 +512,6 @@ +@@ -458,38 +512,6 @@ int fcgi_listen(const char *path, int backlog) if (!tcp) { chmod(path, 0777); - } else { -- char *ip = getenv("FCGI_WEB_SERVER_ADDRS"); -- char *cur, *end; -- int n; -- -- if (ip) { -- ip = strdup(ip); -- cur = ip; -- n = 0; -- while (*cur) { -- if (*cur == ',') n++; -- cur++; -- } -- allowed_clients = malloc(sizeof(in_addr_t) * (n+2)); -- n = 0; -- cur = ip; -- while (cur) { -- end = strchr(cur, ','); -- if (end) { -- *end = 0; -- end++; -- } -- allowed_clients[n] = inet_addr(cur); -- if (allowed_clients[n] == INADDR_NONE) { +- char *ip = getenv("FCGI_WEB_SERVER_ADDRS"); +- char *cur, *end; +- int n; +- +- if (ip) { +- ip = strdup(ip); +- cur = ip; +- n = 0; +- while (*cur) { +- if (*cur == ',') n++; +- cur++; +- } +- allowed_clients = malloc(sizeof(in_addr_t) * (n+2)); +- n = 0; +- cur = ip; +- while (cur) { +- end = strchr(cur, ','); +- if (end) { +- *end = 0; +- end++; +- } +- allowed_clients[n] = inet_addr(cur); +- if (allowed_clients[n] == INADDR_NONE) { - fprintf(stderr, "Wrong IP address '%s' in FCGI_WEB_SERVER_ADDRS\n", cur); -- } -- n++; -- cur = end; -- } -- allowed_clients[n] = INADDR_NONE; +- } +- n++; +- cur = end; +- } +- allowed_clients[n] = INADDR_NONE; - free(ip); - } } if (!is_initialized) { -@@ -863,7 +888,7 @@ +@@ -866,7 +888,7 @@ int fcgi_read(fcgi_request *req, char *str, int len) return n; } @@ -645,7 +732,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c { if (destroy) { zend_hash_destroy(&req->env); -@@ -903,6 +928,10 @@ +@@ -906,6 +928,10 @@ static inline void fcgi_close(fcgi_request *req, int force, int destroy) close(req->fd); #endif req->fd = -1; @@ -656,7 +743,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c } } -@@ -950,6 +979,10 @@ +@@ -953,6 +979,10 @@ int fcgi_accept_request(fcgi_request *req) sa_t sa; socklen_t len = sizeof(sa); @@ -667,7 +754,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c FCGI_LOCK(req->listen_socket); req->fd = accept(listen_socket, (struct sockaddr *)&sa, &len); FCGI_UNLOCK(req->listen_socket); -@@ -985,6 +1018,11 @@ +@@ -988,6 +1018,11 @@ int fcgi_accept_request(fcgi_request *req) break; #else if (req->fd >= 0) { @@ -679,10 +766,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.c php-5.2.8.fpm/sapi/cgi/fastcgi.c #if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) struct pollfd fds; int ret; -diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.h php-5.2.8.fpm/sapi/cgi/fastcgi.h ---- php-5.2.8.vanilla/sapi/cgi/fastcgi.h 2008-10-21 20:43:59.000000000 +0400 -+++ php-5.2.8.fpm/sapi/cgi/fastcgi.h 2008-12-09 04:02:39.000000000 +0300 -@@ -114,6 +114,9 @@ +diff --git a/sapi/cgi/fastcgi.h b/sapi/cgi/fastcgi.h +--- a/sapi/cgi/fastcgi.h ++++ b/sapi/cgi/fastcgi.h +@@ -114,6 +114,9 @@ typedef struct _fcgi_request { int fcgi_init(void); void fcgi_shutdown(void); int fcgi_is_fastcgi(void); @@ -692,7 +779,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.h php-5.2.8.fpm/sapi/cgi/fastcgi.h int fcgi_in_shutdown(void); int fcgi_listen(const char *path, int backlog); void fcgi_init_request(fcgi_request *req, int listen_socket); -@@ -128,6 +131,8 @@ +@@ -128,6 +131,8 @@ int fcgi_read(fcgi_request *req, char *str, int len); int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len); int fcgi_flush(fcgi_request *req, int close); @@ -701,9 +788,36 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fastcgi.h php-5.2.8.fpm/sapi/cgi/fastcgi.h #ifdef PHP_WIN32 void fcgi_impersonate(void); #endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/acinclude.m4 php-5.2.8.fpm/sapi/cgi/fpm/acinclude.m4 ---- php-5.2.8.vanilla/sapi/cgi/fpm/acinclude.m4 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/acinclude.m4 2008-11-16 17:44:51.000000000 +0300 +diff --git a/sapi/cgi/fpm/Makefile.frag b/sapi/cgi/fpm/Makefile.frag +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/Makefile.frag +@@ -0,0 +1,21 @@ ++ ++install-fpm: sapi/cgi/fpm/php-fpm.conf sapi/cgi/fpm/php-fpm ++ @echo "Installing FPM config: $(INSTALL_ROOT)$(php_fpm_conf_path)" ++ -@$(mkinstalldirs) \ ++ $(INSTALL_ROOT)$(prefix)/sbin \ ++ `dirname "$(INSTALL_ROOT)$(php_fpm_conf_path)"` \ ++ `dirname "$(INSTALL_ROOT)$(php_fpm_log_path)"` \ ++ `dirname "$(INSTALL_ROOT)$(php_fpm_pid_path)"` ++ -@if test -r "$(INSTALL_ROOT)$(php_fpm_conf_path)" ; then \ ++ dest=`basename "$(php_fpm_conf_path)"`.default ; \ ++ echo " (installing as $$dest)" ; \ ++ else \ ++ dest=`basename "$(php_fpm_conf_path)"` ; \ ++ fi ; \ ++ $(INSTALL_DATA) $(top_builddir)/sapi/cgi/fpm/php-fpm.conf $(INSTALL_ROOT)`dirname "$(php_fpm_conf_path)"`/$$dest ++ @echo "Installing init.d script: $(INSTALL_ROOT)$(prefix)/sbin/php-fpm" ++ -@$(INSTALL) -m 0755 $(top_builddir)/sapi/cgi/fpm/php-fpm $(INSTALL_ROOT)$(prefix)/sbin/php-fpm ++ ++$(top_builddir)/libevent/libevent.a: $(top_builddir)/libevent/Makefile ++ cd $(top_builddir)/libevent && $(MAKE) libevent.a ++ +diff --git a/sapi/cgi/fpm/acinclude.m4 b/sapi/cgi/fpm/acinclude.m4 +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/acinclude.m4 @@ -0,0 +1,377 @@ + +AC_DEFUN([AC_FPM_CHECK_FUNC], @@ -1082,9 +1196,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/acinclude.m4 php-5.2.8.fpm/sapi/cgi/fpm + AC_MSG_RESULT([no]) + ]) +]) -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/conf/php-fpm.conf.in php-5.2.8.fpm/sapi/cgi/fpm/conf/php-fpm.conf.in ---- php-5.2.8.vanilla/sapi/cgi/fpm/conf/php-fpm.conf.in 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/conf/php-fpm.conf.in 2008-05-23 01:08:35.000000000 +0400 +diff --git a/sapi/cgi/fpm/conf/php-fpm.conf.in b/sapi/cgi/fpm/conf/php-fpm.conf.in +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/conf/php-fpm.conf.in @@ -0,0 +1,156 @@ + + @@ -1242,12 +1357,13 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/conf/php-fpm.conf.in php-5.2.8.fpm/sapi + + + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/config.m4 php-5.2.8.fpm/sapi/cgi/fpm/config.m4 ---- php-5.2.8.vanilla/sapi/cgi/fpm/config.m4 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/config.m4 2008-12-13 07:21:53.000000000 +0300 -@@ -0,0 +1,141 @@ +diff --git a/sapi/cgi/fpm/config.m4 b/sapi/cgi/fpm/config.m4 +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/config.m4 +@@ -0,0 +1,117 @@ + -+FPM_VERSION="0.5.10" ++FPM_VERSION="0.5.14" + +PHP_ARG_WITH(fpm-conf, for php-fpm config file path, +[ --with-fpm-conf=PATH Set the path for php-fpm configuration file [PREFIX/etc/php-fpm.conf]], \$prefix/etc/php-fpm.conf, no) @@ -1286,8 +1402,8 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/config.m4 php-5.2.8.fpm/sapi/cgi/fpm/co +AC_FPM_TRACE +dnl AC_FPM_JUDY + -+LIBEVENT_CFLAGS="-I$abs_srcdir/libevent" -+LIBEVENT_LIBS="$abs_builddir/libevent/libevent.a" ++LIBEVENT_CFLAGS="" ++LIBEVENT_LIBS="-levent" + +SAPI_EXTRA_DEPS="$LIBEVENT_LIBS" + @@ -1316,30 +1432,6 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/config.m4 php-5.2.8.fpm/sapi/cgi/fpm/co + +install_fpm="install-fpm" + -+PHP_CONFIGURE_PART(Configuring libevent) -+ -+test -d "$abs_builddir/libevent" || mkdir -p $abs_builddir/libevent -+ -+dnl this is a bad hack -+ -+chmod +x "$abs_srcdir/libevent/configure" \ -+ "$abs_srcdir/libevent/depcomp" \ -+ "$abs_srcdir/libevent/install-sh" \ -+ "$abs_srcdir/libevent/missing" -+ -+libevent_configure="cd $abs_builddir/libevent ; CFLAGS=\"$CFLAGS $GCC_CFLAGS\" $abs_srcdir/libevent/configure --disable-shared" -+ -+(eval $libevent_configure) -+ -+if test ! -f "$abs_builddir/libevent/Makefile" ; then -+ echo "Failed to configure libevent" >&2 -+ exit 1 -+fi -+ -+dnl another hack for stealing libevent dependant library list -+ -+LIBEVENT_LIBS="$LIBEVENT_LIBS `echo "@LIBS@" | $abs_builddir/libevent/config.status --file=-:-`" -+ +SAPI_EXTRA_LIBS="$LIBEVENT_LIBS $LIBXML_LIBS $JUDY_LIBS" + + @@ -1387,9 +1479,135 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/config.m4 php-5.2.8.fpm/sapi/cgi/fpm/co +PHP_OUTPUT(sapi/cgi/fpm/fpm_autoconf.h) +PHP_OUTPUT(sapi/cgi/fpm/php-fpm.conf:sapi/cgi/fpm/conf/php-fpm.conf.in) +PHP_OUTPUT(sapi/cgi/fpm/php-fpm:sapi/cgi/fpm/init.d/php-fpm.in) -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_arrays.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_arrays.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_arrays.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_arrays.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm.c b/sapi/cgi/fpm/fpm.c +new file mode 100644 +index 0000000..9db2c9b +--- /dev/null ++++ b/sapi/cgi/fpm/fpm.c +@@ -0,0 +1,84 @@ ++ ++ /* $Id$ */ ++ /* (c) 2007,2008 Andrei Nigmatulin */ ++ ++#include "fpm_config.h" ++ ++#include /* for exit */ ++ ++#include "fpm.h" ++#include "fpm_children.h" ++#include "fpm_signals.h" ++#include "fpm_env.h" ++#include "fpm_events.h" ++#include "fpm_cleanup.h" ++#include "fpm_php.h" ++#include "fpm_sockets.h" ++#include "fpm_unix.h" ++#include "fpm_process_ctl.h" ++#include "fpm_conf.h" ++#include "fpm_worker_pool.h" ++#include "fpm_stdio.h" ++#include "zlog.h" ++ ++int fpm; ++ ++struct fpm_globals_s fpm_globals; ++ ++int fpm_init(int argc, char **argv, char *config) ++{ ++ fpm_globals.argc = argc; ++ fpm_globals.argv = argv; ++ fpm_globals.config = config; ++ ++ if (0 > fpm_php_init_main() || ++ 0 > fpm_stdio_init_main() || ++ 0 > fpm_conf_init_main() || ++ 0 > fpm_unix_init_main() || ++ 0 > fpm_env_init_main() || ++ 0 > fpm_signals_init_main() || ++ 0 > fpm_pctl_init_main() || ++ 0 > fpm_children_init_main() || ++ 0 > fpm_sockets_init_main() || ++ 0 > fpm_worker_pool_init_main() || ++ 0 > fpm_event_init_main()) { ++ return -1; ++ } ++ ++ if (0 > fpm_conf_write_pid()) { ++ return -1; ++ } ++ ++ zlog(ZLOG_STUFF, ZLOG_NOTICE, "fpm is running, pid %d", (int) fpm_globals.parent_pid); ++ ++ return 0; ++} ++ ++/* children: return listening socket ++ parent: never return */ ++int fpm_run(int *max_requests) ++{ ++ struct fpm_worker_pool_s *wp; ++ ++ /* create initial children in all pools */ ++ for (wp = fpm_worker_all_pools; wp; wp = wp->next) { ++ int is_parent; ++ ++ is_parent = fpm_children_create_initial(wp); ++ ++ if (!is_parent) { ++ goto run_child; ++ } ++ } ++ ++ /* run event loop forever */ ++ fpm_event_loop(); ++ ++run_child: /* only workers reach this point */ ++ ++ fpm_cleanups_run(FPM_CLEANUP_CHILD); ++ ++ *max_requests = fpm_globals.max_requests; ++ return fpm_globals.listening_socket; ++} ++ +diff --git a/sapi/cgi/fpm/fpm.h b/sapi/cgi/fpm/fpm.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm.h +@@ -0,0 +1,30 @@ ++ ++ /* $Id$ */ ++ /* (c) 2007,2008 Andrei Nigmatulin */ ++ ++#ifndef FPM_H ++#define FPM_H 1 ++ ++#include ++ ++int fpm_run(int *max_requests); ++int fpm_init(int argc, char **argv, char *config); ++ ++struct fpm_globals_s { ++ pid_t parent_pid; ++ int argc; ++ char **argv; ++ char *config; ++ int running_children; ++ int error_log_fd; ++ int log_level; ++ int listening_socket; /* for this child */ ++ int max_requests; /* for this child */ ++ int is_child; ++}; ++ ++extern struct fpm_globals_s fpm_globals; ++ ++extern int fpm; ++ ++#endif +diff --git a/sapi/cgi/fpm/fpm_arrays.h b/sapi/cgi/fpm/fpm_arrays.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_arrays.h @@ -0,0 +1,110 @@ + + /* $Id$ */ @@ -1501,9 +1719,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_arrays.h php-5.2.8.fpm/sapi/cgi/fpm +} + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_atomic.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_atomic.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_atomic.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_atomic.h 2008-09-19 03:34:11.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_atomic.h b/sapi/cgi/fpm/fpm_atomic.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_atomic.h @@ -0,0 +1,85 @@ + + /* $Id$ */ @@ -1590,9 +1809,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_atomic.h php-5.2.8.fpm/sapi/cgi/fpm + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_autoconf.h.in php-5.2.8.fpm/sapi/cgi/fpm/fpm_autoconf.h.in ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_autoconf.h.in 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_autoconf.h.in 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_autoconf.h.in b/sapi/cgi/fpm/fpm_autoconf.h.in +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_autoconf.h.in @@ -0,0 +1,9 @@ + + /* $Id$ */ @@ -1603,97 +1823,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_autoconf.h.in php-5.2.8.fpm/sapi/cg +#define PHP_FPM_LOG_PATH "@php_fpm_log_path@" +#define PHP_FPM_PID_PATH "@php_fpm_pid_path@" + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm.c php-5.2.8.fpm/sapi/cgi/fpm/fpm.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm.c 2008-07-20 20:38:31.000000000 +0400 -@@ -0,0 +1,84 @@ -+ -+ /* $Id$ */ -+ /* (c) 2007,2008 Andrei Nigmatulin */ -+ -+#include "fpm_config.h" -+ -+#include /* for exit */ -+ -+#include "fpm.h" -+#include "fpm_children.h" -+#include "fpm_signals.h" -+#include "fpm_env.h" -+#include "fpm_events.h" -+#include "fpm_cleanup.h" -+#include "fpm_php.h" -+#include "fpm_sockets.h" -+#include "fpm_unix.h" -+#include "fpm_process_ctl.h" -+#include "fpm_conf.h" -+#include "fpm_worker_pool.h" -+#include "fpm_stdio.h" -+#include "zlog.h" -+ -+int fpm; -+ -+struct fpm_globals_s fpm_globals; -+ -+int fpm_init(int argc, char **argv, char *config) -+{ -+ fpm_globals.argc = argc; -+ fpm_globals.argv = argv; -+ fpm_globals.config = config; -+ -+ if (0 > fpm_php_init_main() || -+ 0 > fpm_stdio_init_main() || -+ 0 > fpm_conf_init_main() || -+ 0 > fpm_unix_init_main() || -+ 0 > fpm_env_init_main() || -+ 0 > fpm_signals_init_main() || -+ 0 > fpm_pctl_init_main() || -+ 0 > fpm_children_init_main() || -+ 0 > fpm_sockets_init_main() || -+ 0 > fpm_worker_pool_init_main() || -+ 0 > fpm_event_init_main()) { -+ return -1; -+ } -+ -+ if (0 > fpm_conf_write_pid()) { -+ return -1; -+ } -+ -+ zlog(ZLOG_STUFF, ZLOG_NOTICE, "fpm is running, pid %d", (int) fpm_globals.parent_pid); -+ -+ return 0; -+} -+ -+/* children: return listening socket -+ parent: never return */ -+int fpm_run(int *max_requests) -+{ -+ struct fpm_worker_pool_s *wp; -+ -+ /* create initial children in all pools */ -+ for (wp = fpm_worker_all_pools; wp; wp = wp->next) { -+ int is_parent; -+ -+ is_parent = fpm_children_create_initial(wp); -+ -+ if (!is_parent) { -+ goto run_child; -+ } -+ } -+ -+ /* run event loop forever */ -+ fpm_event_loop(); -+ -+run_child: /* only workers reach this point */ -+ -+ fpm_cleanups_run(FPM_CLEANUP_CHILD); -+ -+ *max_requests = fpm_globals.max_requests; -+ return fpm_globals.listening_socket; -+} -+ -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_children.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_children.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_children.c b/sapi/cgi/fpm/fpm_children.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_children.c @@ -0,0 +1,385 @@ + + /* $Id$ */ @@ -2080,9 +2213,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.c php-5.2.8.fpm/sapi/cgi/f + return 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_children.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_children.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_children.h b/sapi/cgi/fpm/fpm_children.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_children.h @@ -0,0 +1,33 @@ + + /* $Id$ */ @@ -2117,9 +2251,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_children.h php-5.2.8.fpm/sapi/cgi/f +}; + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_cleanup.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_cleanup.c 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_cleanup.c b/sapi/cgi/fpm/fpm_cleanup.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_cleanup.c @@ -0,0 +1,51 @@ + + /* $Id$ */ @@ -2172,9 +2307,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.c php-5.2.8.fpm/sapi/cgi/fp + fpm_array_free(&cleanups); +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_cleanup.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_cleanup.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_cleanup.h b/sapi/cgi/fpm/fpm_cleanup.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_cleanup.h @@ -0,0 +1,21 @@ + + /* $Id$ */ @@ -2197,9 +2333,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_cleanup.h php-5.2.8.fpm/sapi/cgi/fp + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_clock.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_clock.c 2008-09-19 03:19:59.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_clock.c b/sapi/cgi/fpm/fpm_clock.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_clock.c @@ -0,0 +1,115 @@ + + /* $Id$ */ @@ -2316,9 +2453,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.c php-5.2.8.fpm/sapi/cgi/fpm/ +} + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_clock.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_clock.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_clock.h b/sapi/cgi/fpm/fpm_clock.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_clock.h @@ -0,0 +1,13 @@ + + /* $Id$ */ @@ -2333,9 +2471,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_clock.h php-5.2.8.fpm/sapi/cgi/fpm/ +int fpm_clock_get(struct timeval *tv); + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_conf.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_conf.c 2008-12-13 06:50:29.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_conf.c b/sapi/cgi/fpm/fpm_conf.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_conf.c @@ -0,0 +1,532 @@ + + /* $Id$ */ @@ -2869,9 +3008,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.c php-5.2.8.fpm/sapi/cgi/fpm/f + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_conf.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_conf.h 2008-12-13 06:46:49.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_conf.h b/sapi/cgi/fpm/fpm_conf.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_conf.h @@ -0,0 +1,73 @@ + + /* $Id$ */ @@ -2946,9 +3086,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_conf.h php-5.2.8.fpm/sapi/cgi/fpm/f + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_config.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_config.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_config.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_config.h 2008-05-25 04:30:43.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_config.h b/sapi/cgi/fpm/fpm_config.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_config.h @@ -0,0 +1,39 @@ + + /* $Id$ */ @@ -2989,9 +3130,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_config.h php-5.2.8.fpm/sapi/cgi/fpm +#define HAVE_FPM_TRACE 0 +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_env.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_env.c 2008-09-19 03:19:59.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_env.c b/sapi/cgi/fpm/fpm_env.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_env.c @@ -0,0 +1,125 @@ + + /* $Id$ */ @@ -3118,9 +3260,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.c php-5.2.8.fpm/sapi/cgi/fpm/fp + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_env.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_env.h 2008-09-19 03:19:59.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_env.h b/sapi/cgi/fpm/fpm_env.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_env.h @@ -0,0 +1,24 @@ + + /* $Id$ */ @@ -3146,9 +3289,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_env.h php-5.2.8.fpm/sapi/cgi/fpm/fp + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_events.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_events.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_events.c b/sapi/cgi/fpm/fpm_events.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_events.c @@ -0,0 +1,135 @@ + + /* $Id$ */ @@ -3285,9 +3429,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.c php-5.2.8.fpm/sapi/cgi/fpm + (*ev->ev_callback)( (int) ev->ev_fd, (short) ev->ev_res, ev->ev_arg); +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_events.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_events.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_events.h b/sapi/cgi/fpm/fpm_events.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_events.h @@ -0,0 +1,16 @@ + + /* $Id$ */ @@ -3305,43 +3450,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_events.h php-5.2.8.fpm/sapi/cgi/fpm + + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm.h php-5.2.8.fpm/sapi/cgi/fpm/fpm.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm.h 2008-05-24 21:38:47.000000000 +0400 -@@ -0,0 +1,30 @@ -+ -+ /* $Id$ */ -+ /* (c) 2007,2008 Andrei Nigmatulin */ -+ -+#ifndef FPM_H -+#define FPM_H 1 -+ -+#include -+ -+int fpm_run(int *max_requests); -+int fpm_init(int argc, char **argv, char *config); -+ -+struct fpm_globals_s { -+ pid_t parent_pid; -+ int argc; -+ char **argv; -+ char *config; -+ int running_children; -+ int error_log_fd; -+ int log_level; -+ int listening_socket; /* for this child */ -+ int max_requests; /* for this child */ -+ int is_child; -+}; -+ -+extern struct fpm_globals_s fpm_globals; -+ -+extern int fpm; -+ -+#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_php.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_php.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_php.c b/sapi/cgi/fpm/fpm_php.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_php.c @@ -0,0 +1,190 @@ + + /* $Id$ */ @@ -3533,9 +3645,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.c php-5.2.8.fpm/sapi/cgi/fpm/fp + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_php.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_php.h 2008-11-15 03:57:24.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_php.h b/sapi/cgi/fpm/fpm_php.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_php.h @@ -0,0 +1,22 @@ + + /* $Id$ */ @@ -3559,9 +3672,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php.h php-5.2.8.fpm/sapi/cgi/fpm/fp + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_php_trace.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_php_trace.c 2008-11-15 03:57:24.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_php_trace.c b/sapi/cgi/fpm/fpm_php_trace.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_php_trace.c @@ -0,0 +1,171 @@ + + /* $Id$ */ @@ -3734,9 +3848,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.c php-5.2.8.fpm/sapi/cgi/ + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_php_trace.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_php_trace.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_php_trace.h b/sapi/cgi/fpm/fpm_php_trace.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_php_trace.h @@ -0,0 +1,13 @@ + + /* $Id$ */ @@ -3751,9 +3866,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_php_trace.h php-5.2.8.fpm/sapi/cgi/ + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_process_ctl.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_process_ctl.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_process_ctl.c b/sapi/cgi/fpm/fpm_process_ctl.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_process_ctl.c @@ -0,0 +1,354 @@ + + /* $Id$ */ @@ -4109,9 +4225,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.c php-5.2.8.fpm/sapi/cg + evtimer_add(&heartbeat, &tv); +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_process_ctl.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_process_ctl.h 2008-07-21 01:33:10.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_process_ctl.h b/sapi/cgi/fpm/fpm_process_ctl.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_process_ctl.h @@ -0,0 +1,39 @@ + + /* $Id$ */ @@ -4152,9 +4269,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_process_ctl.h php-5.2.8.fpm/sapi/cg + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_request.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_request.c 2008-11-15 03:57:24.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_request.c b/sapi/cgi/fpm/fpm_request.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_request.c @@ -0,0 +1,164 @@ + + /* $Id$ */ @@ -4320,9 +4438,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.c php-5.2.8.fpm/sapi/cgi/fp + +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_request.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_request.h 2008-07-20 05:47:16.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_request.h b/sapi/cgi/fpm/fpm_request.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_request.h @@ -0,0 +1,27 @@ + + /* $Id$ */ @@ -4351,9 +4470,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_request.h php-5.2.8.fpm/sapi/cgi/fp +}; + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm.c 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_shm.c b/sapi/cgi/fpm/fpm_shm.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_shm.c @@ -0,0 +1,100 @@ + + /* $Id$ */ @@ -4455,9 +4575,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.c php-5.2.8.fpm/sapi/cgi/fpm/fp + return ret; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_shm.h b/sapi/cgi/fpm/fpm_shm.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_shm.h @@ -0,0 +1,22 @@ + + /* $Id$ */ @@ -4481,9 +4602,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm.h php-5.2.8.fpm/sapi/cgi/fpm/fp + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm_slots.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm_slots.c 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_shm_slots.c b/sapi/cgi/fpm/fpm_shm_slots.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_shm_slots.c @@ -0,0 +1,127 @@ + + /* $Id$ */ @@ -4612,9 +4734,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.c php-5.2.8.fpm/sapi/cgi/ + s->lock = 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm_slots.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_shm_slots.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_shm_slots.h b/sapi/cgi/fpm/fpm_shm_slots.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_shm_slots.h @@ -0,0 +1,43 @@ + + /* $Id$ */ @@ -4659,9 +4782,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_shm_slots.h php-5.2.8.fpm/sapi/cgi/ + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_signals.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_signals.c 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_signals.c b/sapi/cgi/fpm/fpm_signals.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_signals.c @@ -0,0 +1,252 @@ + + /* $Id$ */ @@ -4915,9 +5039,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.c php-5.2.8.fpm/sapi/cgi/fp +{ + return sp[0]; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_signals.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_signals.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_signals.h b/sapi/cgi/fpm/fpm_signals.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_signals.h @@ -0,0 +1,16 @@ + + /* $Id$ */ @@ -4935,9 +5060,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_signals.h php-5.2.8.fpm/sapi/cgi/fp +extern const char *fpm_signal_names[NSIG + 1]; + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_sockets.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_sockets.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_sockets.c b/sapi/cgi/fpm/fpm_sockets.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_sockets.c @@ -0,0 +1,427 @@ + + /* $Id$ */ @@ -5366,9 +5492,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.c php-5.2.8.fpm/sapi/cgi/fp + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_sockets.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_sockets.h 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_sockets.h b/sapi/cgi/fpm/fpm_sockets.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_sockets.h @@ -0,0 +1,37 @@ + + /* $Id$ */ @@ -5407,9 +5534,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_sockets.h php-5.2.8.fpm/sapi/cgi/fp + (unsigned int) ((unsigned char *) &(sin_addr)->s_addr)[3] + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_stdio.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_stdio.c 2008-12-13 06:32:24.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_stdio.c b/sapi/cgi/fpm/fpm_stdio.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_stdio.c @@ -0,0 +1,286 @@ + + /* $Id$ */ @@ -5697,9 +5825,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.c php-5.2.8.fpm/sapi/cgi/fpm/ + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_stdio.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_stdio.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_stdio.h b/sapi/cgi/fpm/fpm_stdio.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_stdio.h @@ -0,0 +1,20 @@ + + /* $Id$ */ @@ -5721,9 +5850,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_stdio.h php-5.2.8.fpm/sapi/cgi/fpm/ + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_str.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_str.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_str.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_str.h 2008-05-24 21:38:47.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_str.h b/sapi/cgi/fpm/fpm_str.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_str.h @@ -0,0 +1,49 @@ + + /* $Id$ */ @@ -5774,9 +5904,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_str.h php-5.2.8.fpm/sapi/cgi/fpm/fp +} + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace.c 2008-07-21 00:59:00.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_trace.c b/sapi/cgi/fpm/fpm_trace.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_trace.c @@ -0,0 +1,46 @@ + + /* $Id$ */ @@ -5824,9 +5955,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.c php-5.2.8.fpm/sapi/cgi/fpm/ + } +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace.h 2008-07-21 02:43:39.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_trace.h b/sapi/cgi/fpm/fpm_trace.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_trace.h @@ -0,0 +1,17 @@ + + /* $Id$ */ @@ -5845,9 +5977,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace.h php-5.2.8.fpm/sapi/cgi/fpm/ + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_mach.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_mach.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_mach.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_mach.c 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_trace_mach.c b/sapi/cgi/fpm/fpm_trace_mach.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_trace_mach.c @@ -0,0 +1,102 @@ + + /* $Id$ */ @@ -5951,9 +6084,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_mach.c php-5.2.8.fpm/sapi/cgi + return 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_pread.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_pread.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_pread.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_pread.c 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_trace_pread.c b/sapi/cgi/fpm/fpm_trace_pread.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_trace_pread.c @@ -0,0 +1,67 @@ + + /* $Id$ */ @@ -6022,9 +6156,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_pread.c php-5.2.8.fpm/sapi/cg + return 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_ptrace.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_ptrace.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_ptrace.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_trace_ptrace.c 2008-09-19 03:34:11.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_trace_ptrace.c b/sapi/cgi/fpm/fpm_trace_ptrace.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_trace_ptrace.c @@ -0,0 +1,85 @@ + + /* $Id$ */ @@ -6111,9 +6246,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_trace_ptrace.c php-5.2.8.fpm/sapi/c + return 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_unix.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_unix.c 2008-12-13 06:18:23.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_unix.c b/sapi/cgi/fpm/fpm_unix.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_unix.c @@ -0,0 +1,289 @@ + + /* $Id$ */ @@ -6280,7 +6416,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.c php-5.2.8.fpm/sapi/cgi/fpm/f + getrlimit(RLIMIT_NOFILE, &r); + + r.rlim_cur = (rlim_t) wp->config->rlimit_files; -+ ++ r.rlim_max = r.rlim_cur; + if (0 > setrlimit(RLIMIT_NOFILE, &r)) { + zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_NOFILE) failed"); + } @@ -6292,7 +6428,7 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.c php-5.2.8.fpm/sapi/cgi/fpm/f + getrlimit(RLIMIT_CORE, &r); + + r.rlim_cur = wp->config->rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp->config->rlimit_core; -+ ++ r.rlim_max = r.rlim_cur; + if (0 > setrlimit(RLIMIT_CORE, &r)) { + zlog(ZLOG_STUFF, ZLOG_SYSERROR, "setrlimit(RLIMIT_CORE) failed"); + } @@ -6404,9 +6540,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.c php-5.2.8.fpm/sapi/cgi/fpm/f + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_unix.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_unix.h 2008-05-25 17:21:13.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_unix.h b/sapi/cgi/fpm/fpm_unix.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_unix.h @@ -0,0 +1,17 @@ + + /* $Id$ */ @@ -6425,9 +6562,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_unix.h php-5.2.8.fpm/sapi/cgi/fpm/f + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.c php-5.2.8.fpm/sapi/cgi/fpm/fpm_worker_pool.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_worker_pool.c 2008-12-13 06:21:18.000000000 +0300 +diff --git a/sapi/cgi/fpm/fpm_worker_pool.c b/sapi/cgi/fpm/fpm_worker_pool.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_worker_pool.c @@ -0,0 +1,69 @@ + + /* $Id$ */ @@ -6498,9 +6636,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.c php-5.2.8.fpm/sapi/cg + + return 0; +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.h php-5.2.8.fpm/sapi/cgi/fpm/fpm_worker_pool.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/fpm_worker_pool.h 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/fpm_worker_pool.h b/sapi/cgi/fpm/fpm_worker_pool.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/fpm_worker_pool.h @@ -0,0 +1,46 @@ + + /* $Id$ */ @@ -6548,9 +6687,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/fpm_worker_pool.h php-5.2.8.fpm/sapi/cg + +#endif + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/init.d/php-fpm.in php-5.2.8.fpm/sapi/cgi/fpm/init.d/php-fpm.in ---- php-5.2.8.vanilla/sapi/cgi/fpm/init.d/php-fpm.in 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/init.d/php-fpm.in 2008-08-26 19:09:18.000000000 +0400 +diff --git a/sapi/cgi/fpm/init.d/php-fpm.in b/sapi/cgi/fpm/init.d/php-fpm.in +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/init.d/php-fpm.in @@ -0,0 +1,139 @@ +#! /bin/sh + @@ -6691,34 +6831,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/init.d/php-fpm.in php-5.2.8.fpm/sapi/cg + ;; + +esac -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/Makefile.frag php-5.2.8.fpm/sapi/cgi/fpm/Makefile.frag ---- php-5.2.8.vanilla/sapi/cgi/fpm/Makefile.frag 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/Makefile.frag 2008-03-28 21:58:30.000000000 +0300 -@@ -0,0 +1,21 @@ -+ -+install-fpm: sapi/cgi/fpm/php-fpm.conf sapi/cgi/fpm/php-fpm -+ @echo "Installing FPM config: $(INSTALL_ROOT)$(php_fpm_conf_path)" -+ -@$(mkinstalldirs) \ -+ $(INSTALL_ROOT)$(prefix)/sbin \ -+ `dirname "$(INSTALL_ROOT)$(php_fpm_conf_path)"` \ -+ `dirname "$(INSTALL_ROOT)$(php_fpm_log_path)"` \ -+ `dirname "$(INSTALL_ROOT)$(php_fpm_pid_path)"` -+ -@if test -r "$(INSTALL_ROOT)$(php_fpm_conf_path)" ; then \ -+ dest=`basename "$(php_fpm_conf_path)"`.default ; \ -+ echo " (installing as $$dest)" ; \ -+ else \ -+ dest=`basename "$(php_fpm_conf_path)"` ; \ -+ fi ; \ -+ $(INSTALL_DATA) $(top_builddir)/sapi/cgi/fpm/php-fpm.conf $(INSTALL_ROOT)`dirname "$(php_fpm_conf_path)"`/$$dest -+ @echo "Installing init.d script: $(INSTALL_ROOT)$(prefix)/sbin/php-fpm" -+ -@$(INSTALL) -m 0755 $(top_builddir)/sapi/cgi/fpm/php-fpm $(INSTALL_ROOT)$(prefix)/sbin/php-fpm -+ -+$(top_builddir)/libevent/libevent.a: $(top_builddir)/libevent/Makefile -+ cd $(top_builddir)/libevent && $(MAKE) libevent.a -+ -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.c php-5.2.8.fpm/sapi/cgi/fpm/xml_config.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/xml_config.c 2008-08-26 19:09:15.000000000 +0400 +diff --git a/sapi/cgi/fpm/xml_config.c b/sapi/cgi/fpm/xml_config.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/xml_config.c @@ -0,0 +1,278 @@ + + /* $Id$ */ @@ -6998,9 +7114,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.c php-5.2.8.fpm/sapi/cgi/fpm + return 0; +} + -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.h php-5.2.8.fpm/sapi/cgi/fpm/xml_config.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/xml_config.h 2008-09-19 03:02:58.000000000 +0400 +diff --git a/sapi/cgi/fpm/xml_config.h b/sapi/cgi/fpm/xml_config.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/xml_config.h @@ -0,0 +1,43 @@ + + /* $Id$ */ @@ -7045,9 +7162,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/xml_config.h php-5.2.8.fpm/sapi/cgi/fpm +enum { XML_CONF_SCALAR = 1, XML_CONF_SUBSECTION = 2 }; + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/zlog.c php-5.2.8.fpm/sapi/cgi/fpm/zlog.c ---- php-5.2.8.vanilla/sapi/cgi/fpm/zlog.c 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/zlog.c 2008-05-23 01:08:32.000000000 +0400 +diff --git a/sapi/cgi/fpm/zlog.c b/sapi/cgi/fpm/zlog.c +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/zlog.c @@ -0,0 +1,113 @@ + + /* $Id$ */ @@ -7162,9 +7280,10 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/zlog.c php-5.2.8.fpm/sapi/cgi/fpm/zlog. + + write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len); +} -diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/zlog.h php-5.2.8.fpm/sapi/cgi/fpm/zlog.h ---- php-5.2.8.vanilla/sapi/cgi/fpm/zlog.h 1970-01-01 03:00:00.000000000 +0300 -+++ php-5.2.8.fpm/sapi/cgi/fpm/zlog.h 2008-05-23 01:08:32.000000000 +0400 +diff --git a/sapi/cgi/fpm/zlog.h b/sapi/cgi/fpm/zlog.h +new file mode 100644 +--- /dev/null ++++ b/sapi/cgi/fpm/zlog.h @@ -0,0 +1,34 @@ + + /* $Id$ */ @@ -7200,10 +7319,3 @@ diff -Nru php-5.2.8.vanilla/sapi/cgi/fpm/zlog.h php-5.2.8.fpm/sapi/cgi/fpm/zlog. +#define ZLOG_SYSERROR (ZLOG_ERROR | ZLOG_HAVE_ERRNO) + +#endif -diff -Nru php-5.2.8.vanilla/sapi/cgi/Makefile.frag php-5.2.8.fpm/sapi/cgi/Makefile.frag ---- php-5.2.8.vanilla/sapi/cgi/Makefile.frag 2003-07-02 05:08:26.000000000 +0400 -+++ php-5.2.8.fpm/sapi/cgi/Makefile.frag 2008-05-01 20:42:06.000000000 +0400 -@@ -1,2 +1,2 @@ --$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS) -+$(SAPI_CGI_PATH): libphp_common.la $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS) - $(BUILD_CGI)