RE: [PHP-DEV] Problem in CLI
| From: | Andi Gutmans | Date: | Tue, 25 May 2004 12:13:36 +0000 |
| Subject: | RE: [PHP-DEV] Problem in CLI | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-10086@lists.php.net to get a copy of this message | ||
Any chance you can dup() it for the STDERR constant?
At 01:09 PM 5/25/2004 +0100, Wez Furlong wrote:
Yes, so you can do stuff like: fwrite(STDERR, "an error!") without having to manually open and pass around the stream handle. --Wez. -----Original Message----- From: Andi Gutmans [mailto:andi@zend.com] Sent: 25 May 2004 13:07 To: Wez Furlong; internals@lists.php.net Subject: RE: [PHP-DEV] Problem in CLI Why are we creating a resource for these descriptors? Is it for the constants in PHP? Andi At 12:21 PM 5/25/2004 +0100, Wez Furlong wrote:When STDERR gets dtor'd, the descriptor is closed, so theleak messages areheading into the void. The reason for the change was so that PHP CLI could belaunched from inetd andbe able to close descriptors. A (somewhat hacky) fix would be to skip closing thedescriptor if it is thestderr descriptor and if PHP is in request shutdown.