lkml.org 
[lkml]   [1999]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NONBLOCKing close blocks in named
On Fri, 17 Sep 1999, Alan Cox wrote:

> > If a socket file description has the O_NONBLOCK flag set, a close syscall
> > should return almost straight away, right?
>
> If SO_LINGER is set the close() blocks. If SO_LINGER is not set it doesnt
> block. Ok thats the theory anyway.
>
> Check the SO_LINGER settings

Should have mentioned that I checked that. According to the strace,
SO_LINGER hasn't been set or unset on that file descriptor (curiously, it
had been set on a previous socket from the same IP and with the same file
descriptor number).

Even where the LINGER was set (elsewhere in the code) it was set to 120
(units - seconds? - claims to be hundreths of seconds in the setsockopt
man page but I think that's wrong). In the problem that I demonstrated,
close took 11 minutes to return!

I'm tempted to comment out the only SO_LINGER entry in BIND (it doesn't
seem to be needed) to see it help - I'm not sure.

Steve Clarke


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.038 / U:13.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site