Re: named getting stuck in tcp_close (2.2.5-ac1, 2.2.6-ac1-ank1)

Matthias Welwarsky (matze@stud.fbi.fh-darmstadt.de)
Fri, 07 May 1999 23:53:08 +0200


Simon Kirby wrote:
>
> So, I guess the question here is should close() be blocking on this
> socket? Is this a bug in the kernel or in named?
>

Last time I had a look at this the blockage seemed to be due to named
switching the socket from nonblocking to blocking behaviour immediately
before the close().

They seem to do the following:
when accepting a connection:
- accept fd
- save the state of the O_NONBLOCK flag
- set O_NONBLOCK
- FD_SET() the fd for select()

before closing:
- FD_CLR()
- restore the state of O_NONBLOCK flag
- close()

named then blocks until the close() proceeds. I did already send a mail
to them couple of months ago, but never got a reply. So I admit I might
have been looking into the wrong direction..

Gruss
Matthias

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/