From 8997d825d5fcca4afbf6fdf02e2ac7cc117b11ca Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sun, 11 Dec 2022 15:16:30 -0500 Subject: [PATCH] LibSQL: Don't use the SQL socket file path as its descriptor This is just used to key the socket fd for system server takeover. On macOS, this file path has a space in it, which trips up the parsing as it splits on spaces. That parsing should be fixed (probably shouldn't rely on spaces as a delimter), but for now, we can change the key to avoid spaces. --- Userland/Libraries/LibSQL/SQLClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibSQL/SQLClient.cpp b/Userland/Libraries/LibSQL/SQLClient.cpp index 3f41577350..e98f2483bb 100644 --- a/Userland/Libraries/LibSQL/SQLClient.cpp +++ b/Userland/Libraries/LibSQL/SQLClient.cpp @@ -69,7 +69,7 @@ static ErrorOr launch_server(DeprecatedString const& socket_path, Deprecat server_fd = TRY(Core::System::dup(server_fd)); - auto takeover_string = DeprecatedString::formatted("{}:{}", socket_path, server_fd); + auto takeover_string = DeprecatedString::formatted("SQLServer:{}", server_fd); TRY(Core::System::setenv("SOCKET_TAKEOVER"sv, takeover_string, true)); auto arguments = Array {