Messages in this thread | | | Date | Sat, 18 Sep 1999 01:11:38 +0100 (BST) | From | Steven Clarke <> | Subject | Re: 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/
| |