summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>1999-09-04 20:37:24 +0000
committerRasmus Lerdorf <rasmus@php.net>1999-09-04 20:37:24 +0000
commit82d975d6710d29e9b16c1cc25f7058132dc4176e (patch)
tree4eee05d762dc4907b629cdaa0af60cfaef66c8d8
parent0bede914ab627eb1fb955f08a300f8b21296eab9 (diff)
downloadphp-git-82d975d6710d29e9b16c1cc25f7058132dc4176e.tar.gz
Might as well bail as soon as we know we should since this is now
possible. We still need to set our connection status bit field so a shutdown function can figure out if a script was terminated due to an abort, timeout or finished normally.
-rw-r--r--main/main.c6
-rw-r--r--mod_php4.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/main/main.c b/main/main.c
index 5e53f5ffa1..ad812a039f 100644
--- a/main/main.c
+++ b/main/main.c
@@ -244,7 +244,7 @@ void php3_apache_puts(const char *s)
if (SG(server_context)) {
if(rputs(s, (request_rec *) SG(server_context))==-1) {
- PG(connection_status) = PHP_CONNECTION_ABORTED;
+ PG(connection_status) |= PHP_CONNECTION_ABORTED;
}
} else {
fputs(s, stdout);
@@ -257,7 +257,7 @@ void php3_apache_putc(char c)
if (SG(server_context)) {
if(rputc(c, (request_rec *) SG(server_context))!=c) {
- PG(connection_status) = PHP_CONNECTION_ABORTED;
+ PG(connection_status) |= PHP_CONNECTION_ABORTED;
}
} else {
fputc(c, stdout);
@@ -853,7 +853,7 @@ int php_module_startup(sapi_module_struct *sf)
PG(header_is_being_sent) = 0;
SG(request_info).headers_only = 0;
- PG(connection_status) = PHP_CONNECTION_NORMAL;
+ PG(connection_status) |= PHP_CONNECTION_NORMAL;
#if HAVE_SETLOCALE
setlocale(LC_CTYPE, "");
diff --git a/mod_php4.c b/mod_php4.c
index 65d52df220..e6c330e149 100644
--- a/mod_php4.c
+++ b/mod_php4.c
@@ -103,6 +103,7 @@ static int zend_apache_ub_write(const char *str, uint str_length)
}
if(ret != str_length) {
PG(connection_status) = PHP_CONNECTION_ABORTED;
+ if(!PG(ignore_user_abort)) zend_bailout();
}
return ret;
}