#47675 [Opn->Fbk]: File descriptor leak
| From: | jani@php.net | Date: | Mon, 16 Mar 2009 16:21:52 +0000 |
| Subject: | #47675 [Opn->Fbk]: File descriptor leak | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134755@lists.php.net to get a copy of this message | ||
ID: 47675
Updated by: jani@php.net
Reported By: cs at ecn dot purdue dot edu
-Status: Open
+Status: Feedback
-Bug Type: *Web Server problem
+Bug Type: Apache related
Operating System: Solaris 10
PHP Version: 5.2.9
New Comment:
Apache1 or Apache2 ?
Previous Comments:
------------------------------------------------------------------------
[2009-03-16 14:07:47] cs at ecn dot purdue dot edu
Description:
------------
mod_php contains a potential file descriptor leak on Solaris 10 when
script executes "exit()".
Reproduce code:
---------------
<?php exit(0); ?>
The change in behavior is due to the addition of HAVE_BROKEN_GETCWD for
Solaris 10. In php_execute_script, a file descriptor is opened to hold
the current working directory, but is not closed in the case where php
code may not return to this function after executing a script. mod_php
isn't aware of the resource that was allocated and not freed.
Expected result:
----------------
Normally web server runs for days without resource trouble. In the
case where a PHP script does an "exit(0)", the web server will run
out of file descriptors and will need restarting.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47675&edit=1