mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
SystemServer+LibCore: Implement socket takeover
SystemServer can now create sockets on behalf of services before spawning any of them, and pass the open socket fd as fd 3. CLocalServer gains a method to complete the takeover and listen on the passed fd. This is not used by any services at the moment.
This commit is contained in:
parent
396ad4d6b2
commit
c9e21b2bcc
5 changed files with 146 additions and 10 deletions
|
@ -89,11 +89,13 @@ int main(int, char**)
|
|||
CEventLoop event_loop;
|
||||
|
||||
// Read our config and instantiate services.
|
||||
// This takes care of setting up sockets.
|
||||
Vector<RefPtr<Service>> services;
|
||||
auto config = CConfigFile::get_for_system("SystemServer");
|
||||
for (auto name : config->groups())
|
||||
services.append(Service::construct(*config, name));
|
||||
|
||||
// After we've set them all up, spawn them!
|
||||
for (auto& service : services)
|
||||
service->spawn();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue