]> granicus.if.org Git - php/commitdiff
- In IIS ISAPI when the user presses the STOP button while the script is
authorAndi Gutmans <andi@php.net>
Wed, 16 Feb 2000 13:34:07 +0000 (13:34 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 16 Feb 2000 13:34:07 +0000 (13:34 +0000)
  running make sure it stops gracefully. Before it stuck the server.

sapi/isapi/php4isapi.c

index 24e8a96b2aad6fff10e295edf51e59e71362efb4..72a7bec1c0f4c5a4106326749af32072b959a83c 100644 (file)
@@ -136,9 +136,12 @@ static int sapi_isapi_ub_write(const char *str, uint str_length)
        DWORD num_bytes = str_length;
        LPEXTENSION_CONTROL_BLOCK ecb;
        SLS_FETCH();
+       ELS_FETCH();
        
        ecb = (LPEXTENSION_CONTROL_BLOCK) SG(server_context);
-       ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes, HSE_IO_SYNC );
+       if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes, HSE_IO_SYNC ) == FALSE) {
+               longjmp(EG(bailout), 1);
+       }
        return num_bytes;
 }