jilles 51cb2d085a socket: Make shutdown() wake up a blocked accept().
A blocking accept (and some other operations) waits on &so->so_timeo. Once
it wakes up, it will detect the SBS_CANTRCVMORE bit.

The error from accept() is [ECONNABORTED] which is not the nicest one -- the
thread calling accept() needs to know out-of-band what is happening.

A spurious wakeup on so->so_timeo appears harmless (sleep retried) except
when lingering on close (SO_LINGER, and in that case there is no descriptor
to call shutdown() on) so this should be fairly safe.

A shutdown() already woke up a blocked accept() for TCP sockets, but not for
Unix domain sockets. This fix is generic for all domains.

This patch was sent to -hackers@ and -net@ on April 5.

MFC after:	2 weeks
2013-04-30 15:06:30 +00:00
..
2013-04-03 22:24:36 +00:00
2013-04-02 05:30:52 +00:00
2013-03-04 12:20:48 +00:00
MFC
2013-03-02 14:48:41 +00:00
2013-03-02 00:53:12 +00:00
2011-04-13 11:28:46 +00:00
MFC
2011-05-31 21:22:44 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2012-03-28 20:58:30 +00:00
2012-11-14 10:33:12 +00:00
2013-04-05 20:24:51 +00:00
2013-01-23 14:37:05 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
2012-01-26 16:35:09 +00:00
2012-09-14 21:28:56 +00:00
2013-03-02 00:53:12 +00:00
2013-04-02 05:30:52 +00:00
2013-04-02 05:30:52 +00:00
2012-01-02 12:12:10 +00:00
2012-10-25 09:05:21 +00:00
2013-03-02 00:53:12 +00:00
MFC
2013-03-02 14:48:41 +00:00
MFC
2013-02-21 21:59:35 +00:00