same_socket_inode
Whether two paths name the same socket.
Source and package
- Qualified name
-
libtmux::test:: same _socket _inode - Namespace
- libtmux::test
- Package
- libtmux-cxx
- Source
- include/libtmux/testing/scoped_server.hpp
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] libtmux::expected <bool, std::string > same_socket_inode(const std::filesystem:: & left, const std::path filesystem:: & right);path -
Description#
Not
std::filesystem::equivalent: [fs.op.equivalent] makes it an error when both paths are "other" files, and a unix domain socket is one. That is not a corner a tmux suite can avoid — every socket comparison hits it — and the two standard libraries disagree about it. libstdc++ implements the rule and reportsENOTSUP; libc++ answers anyway, so the same test passes on one and fails on the other. This asks the kernel for the inode instead.The error is for a path that could not be inspected at all; a readable pair that names two different sockets is a
false, not a failure.- Parameters
-
-
left(const std::filesystem:: &) #path -
right(const std::filesystem:: &) #path
-