Skip to content

Commit

Permalink
WindowServer: Port to socket takeover
Browse files Browse the repository at this point in the history
  • Loading branch information
bugaevc authored and awesomekling committed Nov 26, 2019
1 parent c9e21b2 commit 22a0562
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Base/etc/SystemServer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ KeepAlive=1
User=anon

[WindowServer]
Socket=/tmp/portal/window
Priority=high
KeepAlive=1
User=anon
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibGUI/GWindowServerConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class GWindowServerConnection : public IPC::Client::Connection<WSAPI_ServerMessa
C_OBJECT(GWindowServerConnection)
public:
GWindowServerConnection()
: Connection("/tmp/wsportal")
: Connection("/tmp/portal/window")
{}

void handshake() override;
Expand Down
4 changes: 2 additions & 2 deletions Servers/WindowServer/WSEventLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ WSEventLoop::WSEventLoop()
m_keyboard_fd = open("/dev/keyboard", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
m_mouse_fd = open("/dev/psaux", O_RDONLY | O_NONBLOCK | O_CLOEXEC);

unlink("/tmp/wsportal");
m_server->listen("/tmp/wsportal");
bool ok = m_server->take_over_from_system_server();
ASSERT(ok);

m_server->on_ready_to_accept = [this] {
auto client_socket = m_server->accept();
Expand Down

0 comments on commit 22a0562

Please sign in to comment.