1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

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.
This commit is contained in:
Sam Atkins 2022-12-02 15:12:51 +00:00 committed by Andreas Kling
parent cb5f83606a
commit 9eb26ddd21

View file

@ -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);
}
}