summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-20 14:21:30 +0000
committerWez Furlong <wez@php.net>2002-03-20 14:21:30 +0000
commit659a071e3df2f16cd21083d1dec8c19e199f7757 (patch)
tree893304b46b1d9c5f937dbbd84cf1a4b9f38f13ce /ext/standard/exec.c
parent14d62c7b624cdcec1006c7d164bfb12b10ae18e5 (diff)
downloadphp-git-659a071e3df2f16cd21083d1dec8c19e199f7757.tar.gz
Streams are all tracked as resources now.
Add some logic that will help track down leaks when debug is enabled.
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index f5f337fee5..4b6b75c768 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -49,7 +49,6 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
int buflen = 0;
int t, l, output=1;
int overflow_limit, lcmd, ldir;
- int rsrc_id;
char *b, *c, *d=NULL;
php_stream *stream = NULL;
#if PHP_SIGCHILD
@@ -143,8 +142,6 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
*/
stream = php_stream_fopen_from_pipe(fp, "rb");
- if (stream)
- rsrc_id = ZEND_REGISTER_RESOURCE(NULL, stream, php_file_le_stream());
if (type != 3) {
l=0;
@@ -219,8 +216,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
}
}
- /* the zend_list_delete will pclose our popen'ed process */
- zend_list_delete(rsrc_id);
+ php_stream_close(stream);
#if HAVE_SYS_WAIT_H
if (WIFEXITED(FG(pclose_ret))) {