#20302 [Opn->Fbk]: Leaked Descriptors
| From: | iliaa@php.net | Date: | Sat, 23 Nov 2002 22:37:44 +0000 |
| Subject: | #20302 [Opn->Fbk]: Leaked Descriptors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-25678@lists.php.net to get a copy of this message | ||
ID: 20302
Updated by: iliaa@php.net
Reported By: linux_4ever@yahoo.com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.18
PHP Version: 4.2.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-11-07 12:20:30] linux_4ever@yahoo.com
Upon investigating the php engine as shipped by RedHat 8.0 with the
env_audit program, I have found that php is leaking descriptors (above
and beyond what apache is leaking). One descriptor is the php webpage
being executed, and 2 copies of the socket returned from accept appear
to be leaked. The env_audit program is listed at freshmeat.net, it
comes with instructions to audit php.
The fix is to add a fcntl(fd, FD_CLOEXEC) after accept and after
opening the page.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20302&edit=1