]> granicus.if.org Git - php/commitdiff
Unify aborted connection handling
authorSascha Schumann <sas@php.net>
Sun, 29 Oct 2000 16:02:40 +0000 (16:02 +0000)
committerSascha Schumann <sas@php.net>
Sun, 29 Oct 2000 16:02:40 +0000 (16:02 +0000)
sapi/cgi/cgi_main.c

index 24d7b833ef28059d3067fc9b9448e17c95e95d47..04f56c7431ad16def5c3a72a7f3eec3611518157 100644 (file)
@@ -98,12 +98,7 @@ static int sapi_cgibin_ub_write(const char *str, uint str_length)
 
        ret = fwrite(str, 1, str_length, stdout);
        if (ret != str_length) {
-               PLS_FETCH();
-
-               PG(connection_status) = PHP_CONNECTION_ABORTED;
-               if (!PG(ignore_user_abort)) {
-                       zend_bailout();
-               }
+               php_handle_aborted_connection();
        }
 
        return ret;
@@ -113,12 +108,7 @@ static int sapi_cgibin_ub_write(const char *str, uint str_length)
 static void sapi_cgibin_flush(void *server_context)
 {
        if (fflush(stdout)==EOF) {
-               PLS_FETCH();
-
-               PG(connection_status) = PHP_CONNECTION_ABORTED;
-               if (!PG(ignore_user_abort)) {
-                       zend_bailout();
-               }
+               php_handle_aborted_connection();
        }
 }