25 int type = SOCK_STREAM;
29 if (socketpair(AF_UNIX, type, 0, sockets) == -1)
30 return llvm::errorCodeToError(llvm::errnoAsErrorCode());
33 for (
int s : sockets) {
34 int r = fcntl(s, F_SETFD, FD_CLOEXEC | fcntl(s, F_GETFD));
40#if defined(SO_NOSIGPIPE)
43 LLDB_LOG(log,
"failed to set NO_SIGPIPE on fd {0}: {1}", sockets[0],
44 llvm::sys::StrError());
46 LLDB_LOG(log,
"failed to set NO_SIGPIPE on fd {0}: {1}", sockets[1],
47 llvm::sys::StrError());
"lldb/Host/posix/DomainSocketPosix.h" POSIX implementation of the platform-specific parts of DomainSo...
static llvm::Expected< Pair > CreatePair()
Create a connected pair of domain sockets using socketpair(2).
std::pair< std::unique_ptr< DomainSocket >, std::unique_ptr< DomainSocket > > Pair