]> granicus.if.org Git - php/commitdiff
Add php_handle_aborted_connection()
authorSascha Schumann <sas@php.net>
Sun, 29 Oct 2000 16:00:42 +0000 (16:00 +0000)
committerSascha Schumann <sas@php.net>
Sun, 29 Oct 2000 16:00:42 +0000 (16:00 +0000)
Call this from your SAPI module to signal an aborted connection.

main/main.c
main/php_main.h

index 90e41c3f3df64e513afed6f2a70c91cdd8377338..e7bf7a4519c67f7cf5fd465fdd7037c9f85f3306 100644 (file)
@@ -1214,6 +1214,17 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
        free_alloca(old_cwd);
 }
 
+PHPAPI void php_handle_aborted_connection(void)
+{
+       PLS_FETCH();
+
+       PG(connection_status) = PHP_CONNECTION_ABORTED;
+
+       if (!PG(ignore_user_abort)) {
+               zend_bailout();
+       }
+}
+
 PHPAPI int php_handle_auth_data(const char *auth SLS_DC)
 {
        int ret = -1;
index 390002d319707e5c0f137c92c6fbd393ed5ec40b..22b1bbc8c49e1ea9d667fa01f1300936fbc62406 100644 (file)
@@ -44,6 +44,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
 PHPAPI int php_handle_special_queries(SLS_D PLS_DC);
 PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC);
 
+PHPAPI void php_handle_aborted_connection(void);
 PHPAPI int php_handle_auth_data(const char *auth SLS_DC);
 
 extern void php_call_shutdown_functions(void);