At 11:17 AM 12/17/2002 +0900, Moriyoshi Koizumi wrote:
Hi,Andi Gutmans <[EMAIL PROTECTED]> wrote:> I didn't understand the explanation. Why do you mind if the resources are > destroyed before the constants? That's good, no? Sorry, I'm still unsure if my patch is the correct one, as I said in the first mail. As far as I've looked into it, the streams seem to be destructed and freed twice, once in deactivation and once in shutdown. If you think my patch is bogus, feel free to revert it unless I can give more reasonable explanation.
I don't like these voodoo patches. I think if the stream is destroyed twice that should be solved and not the constant itself.
Unless you have a good reason please revert your patch and talk to Wez about fixing this properly.
Thanks,
Andi
Moriyoshi
> Andi
>
> At 03:22 PM 12/15/2002 +0900, Moriyoshi Koizumi wrote:
> >It appears that the problem was because stream resources are finalized
> >before the constants that contain those resources are destructed, as
> >php_stream_open_wrapper_ex() doesn't return persistent resources.
> >
> >Moriyoshi
> >
> >Andi Gutmans <[EMAIL PROTECTED]> wrote:
> >
> > > This doesn't look right to me. We always use CONST_PERSISTENT in all of
> > PHP.
> > > What is the problem?
> > >
> > > Andi
> > >
> > > At 10:24 AM 12/11/2002 +0000, Edin Kadribasic wrote:
> > > >edink Wed Dec 11 05:24:03 2002 EDT
> > > >
> > > > Modified files:
> > > > /php4/sapi/cli php_cli.c
> > > > Log:
> > > > Fix for #20539 (patch by Moriyoshi Koizumi).
> > > >
> > > >
> > > >Index: php4/sapi/cli/php_cli.c
> > > >diff -u php4/sapi/cli/php_cli.c:1.55 php4/sapi/cli/php_cli.c:1.56
> > > >--- php4/sapi/cli/php_cli.c:1.55 Mon Dec 9 06:45:46 2002
> > > >+++ php4/sapi/cli/php_cli.c Wed Dec 11 05:24:02 2002
> > > >@@ -375,19 +375,19 @@
> > > > php_stream_to_zval(s_err, zerr);
> > > >
> > > > ic.value = *zin;
> > > >- ic.flags = CONST_CS | CONST_PERSISTENT;
> > > >+ ic.flags = CONST_CS;
> > > > ic.name = zend_strndup("STDIN", 6);
> > > > ic.name_len = 6;
> > > > zend_register_constant(&ic TSRMLS_CC);
> > > >
> > > > oc.value = *zout;
> > > >- oc.flags = CONST_CS | CONST_PERSISTENT;
> > > >+ oc.flags = CONST_CS;
> > > > oc.name = zend_strndup("STDOUT", 7);
> > > > oc.name_len = 7;
> > > > zend_register_constant(&oc TSRMLS_CC);
> > > >
> > > > ec.value = *zerr;
> > > >- ec.flags = CONST_CS | CONST_PERSISTENT;
> > > >+ ec.flags = CONST_CS;
> > > > ec.name = zend_strndup("STDERR", 7);
> > > > ec.name_len = 7;
> > > > zend_register_constant(&ec TSRMLS_CC);
> > > >
> > > >
> > > >
> > > >--
> > > >PHP CVS Mailing List (http://www.php.net/)
> > > >To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > > --
> > > PHP CVS Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> >--
> >PHP CVS Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php