1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +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:
Andreas Kling 2019-03-20 17:14:48 +01:00
parent bc1da7f1fd
commit 367bb9e4eb
4 changed files with 6 additions and 19 deletions

View file

@ -22,7 +22,6 @@ public:
static void for_each_client(Function<void(WSClientConnection&)>);
void post_message(const WSAPI_ServerMessage&);
RetainPtr<GraphicsBitmap> create_shared_bitmap(GraphicsBitmap::Format, const Size&);
int client_id() const { return m_client_id; }
WSMenuBar* app_menubar() { return m_app_menubar.ptr(); }
@ -32,6 +31,8 @@ public:
bool is_showing_modal_window() const;
void set_client_pid(pid_t pid) { m_pid = pid; }
template<typename Matching, typename Callback> void for_each_window_matching(Matching, Callback);
template<typename Callback> void for_each_window(Callback);
@ -66,7 +67,7 @@ private:
int m_client_id { 0 };
int m_fd { -1 };
pid_t m_pid { 0 };
pid_t m_pid { -1 };
HashMap<int, OwnPtr<WSWindow>> m_windows;
HashMap<int, OwnPtr<WSMenuBar>> m_menubars;