Commit 20f4c4d6052 for php

commit 20f4c4d605203b95cf01e76e306c25bdff6678b2
Author: Calvin Buckley <calvinb@php.net>
Date:   Mon Sep 28 15:06:30 2026 -0300

    sapi: Remove sapi_terminate_process (#23524)

    This is unused; this is a vestige of 6c158374ba57792b0e283053e0a22944a42ef25b
    and 45e327a672746e4fb5fe57fa10ff758d1143ad0a, which set up some timeout code
    which was removed in 650c1c0a7d94d3bb052a93407b6e280df9c265a4. Remove this
    useless function from SAPIs.

diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index a97aa97e528..47ba6dd51a5 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -17,6 +17,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES
 - Removed zend_execute_scripts(). Manually call zend_execute_script() in a loop
   instead.
 - Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
+- The sapi_terminate_process() function was removed.

 ========================
 2. Build system changes
@@ -40,3 +41,5 @@ PHP 8.7 INTERNALS UPGRADE NOTES
 ========================
 5. SAPI changes
 ========================
+
+- The terminate_process method has been removed.
diff --git a/main/SAPI.c b/main/SAPI.c
index c72ea50e0f7..a5c2ba89b8c 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -1089,12 +1089,6 @@ SAPI_API double sapi_get_request_time(void)
 	return SG(global_request_time);
 }

-SAPI_API void sapi_terminate_process(void) {
-	if (sapi_module.terminate_process) {
-		sapi_module.terminate_process();
-	}
-}
-
 SAPI_API void sapi_add_request_header(const char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg) /* {{{ */
 {
 	zval *return_value = (zval*)arg;
diff --git a/main/SAPI.h b/main/SAPI.h
index 2621b9184d1..674442d2267 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -230,7 +230,6 @@ SAPI_API int sapi_force_http_10(void);
 SAPI_API int sapi_get_target_uid(uid_t *);
 SAPI_API int sapi_get_target_gid(gid_t *);
 SAPI_API double sapi_get_request_time(void);
-SAPI_API void sapi_terminate_process(void);
 END_EXTERN_C()

 struct _sapi_module_struct {
@@ -260,7 +259,6 @@ struct _sapi_module_struct {
 	void (*register_server_variables)(zval *track_vars_array);
 	void (*log_message)(const char *message, int syslog_type_int);
 	zend_result (*get_request_time)(double *request_time);
-	void (*terminate_process)(void);

 	char *php_ini_path_override;

diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 72dff2b03a7..44c6b2ca1b3 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -410,7 +410,6 @@ static sapi_module_struct apache2_sapi_module = {
 	php_apache_sapi_register_variables,
 	php_apache_sapi_log_message,			/* Log message */
 	php_apache_sapi_get_request_time,		/* Request Time */
-	NULL,						/* Child Terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index a79eada2728..929c3db4273 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -999,7 +999,6 @@ static sapi_module_struct cgi_sapi_module = {
 	sapi_cgi_register_variables,	/* register server variables */
 	sapi_cgi_log_message,			/* Log message */
 	NULL,							/* Get request time */
-	NULL,							/* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 9cd1f5a8c15..3702da89f9f 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -431,7 +431,6 @@ static sapi_module_struct cli_sapi_module = {
 	sapi_cli_register_variables,	/* register server variables */
 	sapi_cli_log_message,			/* Log message */
 	NULL,							/* Get request time */
-	NULL,							/* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index e84348c95b4..6e11e6b265f 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -813,7 +813,6 @@ sapi_module_struct cli_server_sapi_module = {
 	sapi_cli_server_register_variables,	/* register server variables */
 	sapi_cli_server_log_message,	/* Log message */
 	NULL,							/* Get request time */
-	NULL,							/* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 }; /* }}} */
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 96534c18a69..3be8db4cc01 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -142,7 +142,6 @@ EMBED_SAPI_API sapi_module_struct php_embed_module = {
 	php_embed_register_variables,  /* register server variables */
 	php_embed_log_message,         /* Log message */
 	NULL,                          /* Get request time */
-	NULL,                          /* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 655d66ce5f0..250c926563f 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -812,7 +812,6 @@ static sapi_module_struct cgi_sapi_module = {
 	sapi_cgi_register_variables,	/* register server variables */
 	sapi_cgi_log_message,			/* Log message */
 	NULL,							/* Get request time */
-	NULL,							/* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c
index 96fe75ab7a8..11474433834 100644
--- a/sapi/fuzzer/fuzzer-sapi.c
+++ b/sapi/fuzzer/fuzzer-sapi.c
@@ -119,7 +119,6 @@ static sapi_module_struct fuzzer_module = {
 	register_variables,  /* register server variables */
 	log_message,         /* Log message */
 	NULL,                          /* Get request time */
-	NULL,                          /* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 2acbd432ee8..d4e8328b3a2 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -614,7 +614,6 @@ static sapi_module_struct lsapi_sapi_module =
     sapi_lsapi_register_variables,  /* register server variables */
     sapi_lsapi_log_message,         /* Log message */
     NULL,                           /* Get request time */
-    NULL,                           /* Child terminate */

     STANDARD_SAPI_MODULE_PROPERTIES

diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 8cdc1aee9d4..834948e6815 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -953,7 +953,7 @@ static sapi_module_struct phpdbg_sapi_module = {
 	php_sapi_phpdbg_register_vars,  /* register server variables */
 	php_sapi_phpdbg_log_message,    /* Log message */
 	NULL,                           /* Get request time */
-	NULL,                           /* Child terminate */
+
 	STANDARD_SAPI_MODULE_PROPERTIES
 };
 /* }}} */