mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
Kernel: Remove ioctl for getting a socket peer's PID.
Now that everything is nice and mature, the WindowServer can just use the client PID it receives in the Greeting message, and we can get rid of this hacky ioctl. :^)
This commit is contained in:
@@ -40,9 +40,6 @@ WSClientConnection::WSClientConnection(int fd)
|
||||
static int s_next_client_id = 0;
|
||||
m_client_id = ++s_next_client_id;
|
||||
|
||||
int rc = ioctl(m_fd, 413, (int)&m_pid);
|
||||
ASSERT(rc == 0);
|
||||
|
||||
if (!s_connections)
|
||||
s_connections = new HashMap<int, WSClientConnection*>;
|
||||
s_connections->set(m_client_id, this);
|
||||
@@ -86,13 +83,6 @@ void WSClientConnection::post_message(const WSAPI_ServerMessage& message)
|
||||
ASSERT(nwritten == sizeof(message));
|
||||
}
|
||||
|
||||
RetainPtr<GraphicsBitmap> WSClientConnection::create_shared_bitmap(GraphicsBitmap::Format format, const Size& size)
|
||||
{
|
||||
auto shared_buffer = SharedBuffer::create(m_pid, size.area() * sizeof(RGBA32));
|
||||
ASSERT(shared_buffer);
|
||||
return GraphicsBitmap::create_with_shared_buffer(format, *shared_buffer, size);
|
||||
}
|
||||
|
||||
void WSClientConnection::on_message(WSMessage& message)
|
||||
{
|
||||
if (message.is_client_request()) {
|
||||
|
||||
Reference in New Issue
Block a user