FAQ

On Mon, Mar 26, 2001 at 06:29:07PM +0000, nick@ing-simmons.net wrote:
Benjamin Sugars <bsugars@canoe.ca> writes:
Hi,

On recent bleadperls, a call to socket() will leak a file descriptor if
the filehandle has already been opened. For example, the following script
causes the process to die with the message "Too many open files".

while (1) {
socket S, 1, 2, 0 or die $!;
}

The patch below fixes the leak. Not sure if it's the right fix or not,
but all tests still pass. If it is the right fix, then someone should
look at pp_sockpair() too, because at first glance it looks like it might
have the same problem.

Patch is against perl@9359.
Patch looks good.
Patch applied, also to pp_sockpair().
should socket() become
open($fg,"+<",":socket:Unix:Datagram", $addr);
though ;-)

(Yes I am getting fixated - I must calm down...)
:-)

--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedMar 26, '01 at 6:26p
activeMar 26, '01 at 6:45p
posts3
users3
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase