From: Marcin Krol Date: Tue, 13 Jan 2026 20:06:27 +0000 (+0100) Subject: - restored missing chunk X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=95e407659c3c8e0d96629b4df86639f38734f0d7;p=packages%2Fphp.git - restored missing chunk --- diff --git a/php-fcgi-graceful.patch b/php-fcgi-graceful.patch index 50d685b..cc33f8a 100644 --- a/php-fcgi-graceful.patch +++ b/php-fcgi-graceful.patch @@ -18,8 +18,8 @@ while ($i < 35) { echo "end!
\n"; ?> ---- 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 +--- php-8.5.1/sapi/cgi/cgi_main.c.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/sapi/cgi/cgi_main.c 2026-01-13 20:40:34.050183839 +0100 @@ -117,6 +117,9 @@ static int children = 0; */ static int parent = 1; @@ -30,7 +30,7 @@ echo "end!
\n"; #ifndef PHP_WIN32 /* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */ static volatile sig_atomic_t exit_signal = 0; -@@ -1221,6 +1224,21 @@ +@@ -1501,6 +1504,21 @@ BOOL WINAPI fastcgi_cleanup(DWORD sig) } #endif @@ -52,7 +52,7 @@ echo "end!
\n"; PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("cgi.rfc2616_headers", "0", PHP_INI_ALL, OnUpdateBool, rfc2616_headers, php_cgi_globals_struct, php_cgi_globals) STD_PHP_INI_BOOLEAN("cgi.nph", "0", PHP_INI_ALL, OnUpdateBool, nph, php_cgi_globals_struct, php_cgi_globals) -@@ -1764,7 +1764,6 @@ +@@ -1733,7 +1751,6 @@ int main(int argc, char *argv[]) int requests = 0; int fastcgi; char *bindpath = NULL; @@ -60,3 +60,19 @@ echo "end!
\n"; fcgi_request *request = NULL; int warmup_repeats = 0; int repeats = 1; +@@ -2044,9 +2061,14 @@ consult the installation file that came + php_child_init(); + + /* 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); ++ + zend_signal_init(); + break; + case -1: