K 10 svn:author V 5 trasz K 8 svn:date V 27 2020-08-24T16:25:27.701170Z K 7 svn:log V 569 MFC r362833: Rework linux accept(2). This makes the code flow easier to follow, and fixes a bug where calling accept(2) could result in closing fd 0. Note that the code still contains a number of problems: it makes assumptions about l_sockaddr_in being the same as sockaddr_in, the EFAULT-related code looks like it doesn't work at all, and the socket type check is racy. Those will be addressed later on; I'm trying to work in small steps to avoid breaking one thing while fixing another. It fixes Redis, among other things. Sponsored by: The FreeBSD Foundation END