in reply to Re: another core dump
in thread another core dump

Good point, I am now adding the detach and undef.

I noticed from time to time, that when Perl fail to allocate memory, it dies pretty ugly ;-), and it should be fixed.

In case those changes you suggested, improves the situation, but cannot resolve the problem, what I will do then is to get rid of IO::Socket::INET, and go with low level socket. Remember that bless is not thread-safe at this point. I will come back with the result and share with you and everyone.

No, it does not support POST, that's a known caveat, but I don't have time to worry about it now ;-)

Replies are listed 'Best First'.
Re: Re: Re: another core dump
by BrowserUk (Patriarch) on Oct 25, 2003 at 06:07 UTC

    FWIW, I changed the regex to

    my $page = ($req =~ m/^(?:GET|POST|HEAD)\s*(.*?)\s/)[0];

    And (assuming this works:), I am posting this reply via your proxy.

    As far as the IO::Socket::INET code is concerned, as far as I can tell, it should be ok. The module is being replicated into each thread, so each will have its own copy of the code and as the underlying resource is a GLOB, essentially a filehandle, it is a process global resource that should work okay so long as you don't try and use it simultaneously.

    I *think* that by locking $browser inside the if statement in process_one_req(), before you print to it, you should be okay to stick with it.... I'll try to verify this.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!