On Tue, Aug 23, 2005 at 11:10:58AM -0400, Mason Loring Bliss wrote:

> Hi, all! I'm learning about dealing with sockets in Perl, and I've got a
> question about some unexpected behaviour exhibited by the following test
> script.
> 
> In the case where I open a connection and then close it before
> $socket->accept() is called, I'd expect $socket->accept() to return undef,
> but it never does. Will someone kindly tell me why this is?
> 
> Thanks in advance!

Is there a forum other than this one where I might ask this question? I
was hoping that maybe someone here knew the answer and would share it...

Should $socket->accept() return undef if the client in question has died
off before the server has gotten around to accepting() the connection?
Maybe my assumption is faulty, and there's no implicit close happening
when the initiating process dies. I'll explore this possibility.

Hm. No. When the client calls shutdown(2) or close() before the server
calls accept(), the server's $socket->accept still returns with a socket,
and not undef.

Am I missing something fundamental here? Is this a bug in IO::Socket? Is
there some other issue of which I'm unaware?

Thanks in advance for enlightening me.

-- 
 Mason Loring Bliss         [EMAIL PROTECTED]        http://blisses.org/  
"I am a brother of jackals, and a companion of ostriches."  (Job 30 : 29)

Attachment: pgpmAloJqxY4M.pgp
Description: PGP signature

Reply via email to