When STDERR gets dtor'd, the descriptor is closed, so the leak messages are
heading into the void.

The reason for the change was so that PHP CLI could be launched from inetd and
be able to close descriptors.

A (somewhat hacky) fix would be to skip closing the descriptor if it is the
stderr descriptor and if PHP is in request shutdown.

--Wez.

> -----Original Message-----
> From: Andi Gutmans [mailto:[EMAIL PROTECTED] 
> Sent: 25 May 2004 11:14
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] Problem in CLI
> 
> The following script:
> <?php
> error_reporting(E_ALL);
> leak(100);
> print "hello\n";
> 
> Doesn't report a leak in CLI mode but it does in CGI. It 
> seems that stderr 
> and stdout file descriptors are getting screwed up in CLI. I remember 
> someone messing around with this.
> Any ideas?
> 
> Thanks,
> 
> Andi
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to