mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-31 12:35:51 +00:00
getpeername on a socketpair end returned the unnamed AF_UNIX address even after the other end was closed. In FreeBSD 11, closing an end runs uipc_detach, whose unp_disconnect and unp_drop clear SS_ISCONNECTED on both stream and datagram ends, and kern_getpeername then fails with ENOTCONN. Each end now keeps a weak reference to its peer's socket, which expires when the peer's last descriptor, duplicates included, is closed. shutdown leaves the ends connected, as soshutdown does.