1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

SystemServer: Add support for multi-instance services

For this kind of services, there's no single PID of a running instance;
there may be multiple, or no instances of the service running at any time.
No keepalive functionality is available in this mode, since "alive" doesn't
make sense for multi-instance services.

At the moment, there's no way to actually create multiple instances of
a service; this is going to be added in the next commit.
This commit is contained in:
Sergey Bugaev 2020-06-08 23:47:10 +03:00 committed by Andreas Kling
parent 31b025fcfc
commit ac4c2f890f
3 changed files with 21 additions and 9 deletions

View file

@ -73,10 +73,12 @@ private:
String m_working_directory;
// Boot modes to run this service in. By default, this is the graphical mode.
Vector<String> m_boot_modes;
// Whether several instances of this service can run at once.
bool m_multi_instance { false };
// Environment variables to pass to the service.
Vector<String> m_environment;
// PID of the running instance of this service.
// For single-instance services, PID of the running instance of this service.
pid_t m_pid { -1 };
// An open fd to the socket.
int m_socket_fd { -1 };