summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-08-28 17:15:03 +0000
committerAntony Dovgal <tony2001@php.net>2006-08-28 17:15:03 +0000
commit4e971e88744acbdf6fff98cd6d37bd4f2d3b3f6f (patch)
tree01ca38423c6b0c2e0192841021bf8809d4de0543
parent191d68618aae6de6a65a1512fa97dfe99c49248e (diff)
downloadphp-git-4e971e88744acbdf6fff98cd6d37bd4f2d3b3f6f.tar.gz
MFH: fix #38199 (fclose() unable to close STDOUT and STDERR)
-rw-r--r--NEWS1
-rw-r--r--main/streams/plain_wrapper.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 58d706b281..cbd27f78e0 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ PHP NEWS
- Fixed bug #38315 (Constructing in the destructor causes weird behaviour).
(Dmitry)
- Fixed bug #38265 (heap corruption). (Dmitry)
+- Fixed bug #38199 (fclose() unable to close STDOUT and STDERR). (Tony)
- Fixed bug #33895 (Missing math constants). (Hannes)
- Fixed PECL bug #8112 (OCI8 persistent connections misbehave when Apache
process times out). (Tony)
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 54cc39b7f6..e9126de4eb 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -373,7 +373,7 @@ static int php_stdiop_close(php_stream *stream, int close_handle TSRMLS_DC)
data->file = NULL;
}
} else if (data->fd != -1) {
-#ifdef PHP_DEBUG
+#if PHP_DEBUG
if ((data->fd == 1 || data->fd == 2) && 0 == strcmp(sapi_module.name, "cli")) {
/* don't close stdout or stderr in CLI in DEBUG mode, as we want to see any leaks */
ret = 0;