mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibIPC: Get client/server PIDs using getsockopt(SO_PEERCRED)
Instead of passing the PIDs back and forth in a handshake "Greet" message, just use getsockopt(SO_PEERCRED) on both sides to get the same information from the kernel. This is a nice little simplification of the IPC protocol, although it does not get rid of the handshake since we still have to pass the "client ID" from the server to each client so they know how to refer to themselves. This might not be necessary and we might be able to get rid of this later on.
This commit is contained in:
@@ -598,10 +598,9 @@ void WSClientConnection::handle(const WindowServer::WM_SetWindowMinimized& messa
|
||||
window.set_minimized(message.minimized());
|
||||
}
|
||||
|
||||
OwnPtr<WindowServer::GreetResponse> WSClientConnection::handle(const WindowServer::Greet& message)
|
||||
OwnPtr<WindowServer::GreetResponse> WSClientConnection::handle(const WindowServer::Greet&)
|
||||
{
|
||||
set_client_pid(message.client_pid());
|
||||
return make<WindowServer::GreetResponse>(getpid(), client_id(), WSScreen::the().rect());
|
||||
return make<WindowServer::GreetResponse>(client_id(), WSScreen::the().rect());
|
||||
}
|
||||
|
||||
bool WSClientConnection::is_showing_modal_window() const
|
||||
|
||||
Reference in New Issue
Block a user