1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 12:05:00 +00:00

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.
This commit is contained in:
Timothy Flynn 2022-12-11 15:16:30 -05:00 committed by Andrew Kaster
parent 4d3bb5ada4
commit 8997d825d5

View file

@ -69,7 +69,7 @@ static ErrorOr<void> 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 {