[all-commits] [llvm/llvm-project] 785754: [LLVM][Cygwin] add workaround for blocking connect...
jeremyd2019 via All-commits
all-commits at lists.llvm.org
Wed May 21 22:15:43 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7857543a6350f49f12d17af0bcf2c0f42db0311e
https://github.com/llvm/llvm-project/commit/7857543a6350f49f12d17af0bcf2c0f42db0311e
Author: jeremyd2019 <github at jdrake.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M llvm/lib/Support/raw_socket_stream.cpp
Log Message:
-----------
[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:
* https://github.com/cygwin/cygwin/blob/cec8a6680ea1fe38f38001b06c34ae355a785209/winsup/cygwin/fhandler/socket_local.cc#L1462-L1471
* https://inbox.sourceware.org/cygwin/Z_UERXFI1g-1v3p2@calimero.vinschen.de/T/#u
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list