Files
clang-p2996/llvm/lib/Support/raw_socket_stream.cpp
jeremyd2019 7857543a63 [LLVM][Cygwin] add workaround for blocking connect/accept in AF_UNIX sockets (#140353)
On Cygwin, UNIX sockets involve a handshake between connect and accept
to enable SO_PEERCRED/getpeereid handling. This necessitates accept
being called before connect can return, but at least the tests in
llvm/unittests/Support/raw_socket_stream_test do both on the same thread
(first connect and then accept), resulting in a deadlock. Add a call to
both places sockets are created that turns off the handshake (and
SO_PEERCRED/getpeereid support).

References:
* cec8a6680e/winsup/cygwin/fhandler/socket_local.cc (L1462-L1471)
* https://inbox.sourceware.org/cygwin/Z_UERXFI1g-1v3p2@calimero.vinschen.de/T/#u
2025-05-22 08:15:21 +03:00

12 KiB