diff options
author | Wez Furlong <wez@php.net> | 2005-06-09 12:15:14 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-06-09 12:15:14 +0000 |
commit | a4874a5533fca211ac877ae6dae4cd632f247f2d (patch) | |
tree | 976efcc0dbcf43f8b070b54f730ec2c21e95dbbb | |
parent | e0b0ae9ce7c5f901e982d8deaee89bdb09bef852 (diff) | |
download | php-git-a4874a5533fca211ac877ae6dae4cd632f247f2d.tar.gz |
hmm, backing out this change, as it seems to cause problems with user-space
streams and filters (the ZE needs to close them before it blows away the
user-space code.
Noticed by Dmitry. Still need to find out how to avoid double-closing streams.
-rw-r--r-- | main/main.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/main/main.c b/main/main.c index c4b50ba84f..bffb89fb1c 100644 --- a/main/main.c +++ b/main/main.c @@ -835,12 +835,10 @@ static FILE *php_fopen_wrapper_for_zend(const char *filename, char **opened_path } /* }}} */ -#if wez_0 static void stream_closer_for_zend(void *handle TSRMLS_DC) { php_stream_close((php_stream*)handle); } -#endif static long stream_fteller_for_zend(void *handle TSRMLS_DC) { @@ -859,10 +857,7 @@ static int php_stream_open_for_zend(const char *filename, zend_file_handle *hand handle->free_filename = 0; handle->handle.stream.handle = stream; handle->handle.stream.reader = (zend_stream_reader_t)_php_stream_read; - /* don't set this; all streams are tracked as part of the resource system, - * and we'll end up double-free'ing them if we allow zend to close them - * down after the resource list has been cleaned up */ - handle->handle.stream.closer = NULL; /* stream_closer_for_zend; */ + handle->handle.stream.closer = stream_closer_for_zend; handle->handle.stream.fteller = stream_fteller_for_zend; handle->handle.stream.interactive = 0; /* suppress warning if this stream is not explicitly closed */ |