Browse Source

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.
Sam Atkins 2 năm trước cách đây
mục cha
commit
9eb26ddd21
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Userland/Libraries/LibCore/LocalServer.cpp

+ 1 - 1
Userland/Libraries/LibCore/LocalServer.cpp

@@ -133,7 +133,7 @@ ErrorOr<NonnullOwnPtr<Stream::LocalSocket>> 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);
 }
 
 }