Re:Fun with BPF, or, shutting down a TCP listening socket th...
by smegel on Saturday July 25, 2015 @06:41PM
(#9949325)
Why can't they just use a lock around the accept() like the thundering herd solution, that way the thread shutting down the socket can do so knowing nothing else is accepting new connections at the time?
[ Parent
| on HN ]
Re:Fun with BPF, or, shutting down a TCP listening socket th...
by _wmd on Saturday July 25, 2015 @07:00PM
(#9949376)
The process accepting the connections (the kernel) runs entirely asynchronously to the application, and there is no way to signal it to stop accepting new connections except by calling close(), which has the dual effect of triggering the connection resets.