Subject: Re: [Bug 106241] New: shutdown(3)/close(3) behaviour is incorrect for sockets in accept(3)

From: Alan Burlison <[email-masked]>
Date: Tue, 20 Oct 2015 12:39:50 +0100

On 20/10/2015 12:24, David Miller wrote:

> With two decades of precendence, applications will need to find a way
> to cope with the behavior on every existing Linux kernel out there.
>
> Even if we were to propose something here and change things, it won't
> be available on real sites for 6 months at a minimum, and only a an
> extremely small fraction of actual machines.
>
> It's more practical for userspace to cope with the bahvior.  This is
> simply because coping with current behavior will work on every Linux
> kernel on the planet, and also it won't require us to potentially
> break any existing setups.

Yes, as I said I think in practice about the best that can be done is to 
document the behaviour, although I think the assertion of their being 
millions of apps that would be affected is an over-estimate. Only MT 
apps that use accept() in one thread and shutdown() in another should be 
impacted, i.e mainly threaded apps that act as network service providers 
of one form or another.

But having said that, the behaviour of close() and poll() on sockets 
being used in accept() still looks incorrect.

-- 
Alan Burlison
--