mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-11 06:00:20 +02:00
FEXServerClient: Workaround sun_path 108 byte limit
We really don't want to do this, but in the case that the AF_UNIX path is longer than the 108-byte limit that sun_path provides we don't really have a choice. The alternative choice would be to switch /entirely/ away from AF_UNIX and instead use pipes. We need a bandage fix for now, so throw the socket in to a temp folder if the path is too long.
This commit is contained in:
3 files changed
+29
-10
No files matched your search
@@ -228,7 +228,12 @@ bool InitializeServerSocket(bool abstract) {
|
||||
if (abstract) {
|
||||
ServerSocketName = FEXServerClient::GetServerSocketName();
|
||||
} else {
|
||||
ServerSocketName = FEXServerClient::GetServerSocketPath();
|
||||
ServerSocketName = FEXServerClient::GetServerSocketPath(false);
|
||||
if (ServerSocketName.size() > sizeof(sockaddr_un::sun_path) - 1) {
|
||||
LogMan::Msg::EFmt("Socket path '{}' too large for Unix domain sockets. Moving to tmp", ServerSocketName);
|
||||
ServerSocketName = FEXServerClient::GetServerSocketPath(true);
|
||||
}
|
||||
|
||||
// Unlink the socket file if it exists
|
||||
// We are being asked to create a daemon, not error check
|
||||
// We don't care if this failed or not
|
||||
|
||||
Reference in new issue
Block a user