From 9eb26ddd216bbddcd253bb5cadb7f2a3544a2f53 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 2 Dec 2022 15:12:51 +0000 Subject: [PATCH] LibCore: Mark LocalServer client sockets as MSG_NOSIGNAL Make LocalServer connections not terminate their process from SIGPIPE, which fixes the issue where closing DisplaySettings with the[OK] button would often crash WindowServer. --- Userland/Libraries/LibCore/LocalServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCore/LocalServer.cpp b/Userland/Libraries/LibCore/LocalServer.cpp index d4ed0cac75..c558ffdff5 100644 --- a/Userland/Libraries/LibCore/LocalServer.cpp +++ b/Userland/Libraries/LibCore/LocalServer.cpp @@ -133,7 +133,7 @@ ErrorOr> LocalServer::accept() (void)fcntl(accepted_fd, F_SETFD, FD_CLOEXEC); #endif - return Stream::LocalSocket::adopt_fd(accepted_fd); + return Stream::LocalSocket::adopt_fd(accepted_fd, Stream::PreventSIGPIPE::Yes); } }