mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-20 01:01:54 +00:00
LibSQL: Output a more specific error on failed socket creation
This can fail if /run/user/$pid/ doesn't exist, which can happen on wsl without systemd.
This commit is contained in:
parent
6805f71a83
commit
c2655d3733
Notes:
sideshowbarker
2024-07-17 02:51:28 +09:00
Author: https://github.com/yedayak
Commit: c2655d3733
Pull-request: https://github.com/SerenityOS/serenity/pull/16607
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,12 @@ static ErrorOr<int> create_database_socket(DeprecatedString const& socket_path)
|
|||
|
||||
static ErrorOr<void> launch_server(DeprecatedString const& socket_path, DeprecatedString const& pid_path, StringView server_path)
|
||||
{
|
||||
auto server_fd = TRY(create_database_socket(socket_path));
|
||||
auto server_fd_or_error = create_database_socket(socket_path);
|
||||
if (server_fd_or_error.is_error()) {
|
||||
warnln("Failed to create a database socket at {}: {}", socket_path, server_fd_or_error.error());
|
||||
return server_fd_or_error.release_error();
|
||||
}
|
||||
auto server_fd = server_fd_or_error.value();
|
||||
auto server_pid = TRY(Core::System::fork());
|
||||
|
||||
if (server_pid == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue