]> granicus.if.org Git - php/commitdiff
- Fix problem with debug mode on selective machines
authorMarcus Boerger <helly@php.net>
Sun, 17 Jul 2005 18:39:24 +0000 (18:39 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 17 Jul 2005 18:39:24 +0000 (18:39 +0000)
main/streams/plain_wrapper.c

index 40af58b9466303955684485c5fee3fe45d1dd836..52c5e1d1e4cefabdaa29adff2164e4079151b4d4 100644 (file)
@@ -368,8 +368,8 @@ static int php_stdiop_close(php_stream *stream, int close_handle TSRMLS_DC)
                        }
                } else if (data->fd != -1) {
 #ifdef PHP_DEBUG
-                       if (data->fd == 2 && 0 == strcmp(sapi_module.name, "cli")) {
-                               /* don't close stderr in CLI in DEBUG mode, as we want to see any leaks */
+                       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;
                        } else {
                                ret = close(data->fd);