summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-18 13:53:36 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-18 13:53:36 +0200
commitbd45a55d86c1e525509aaeca09a3fb060a5b2a0d (patch)
tree896f042b6563fb44daaec5e0ce2d1795ecff3f00 /Servers
parenta48feea1e3eff6166add5a079d54e622d813df2b (diff)
downloadserenity-bd45a55d86c1e525509aaeca09a3fb060a5b2a0d.zip
SystemServer: Let's only spawn one TTYServer by default
We're rarely/never accessing these anyway, and this tidies up the process table a little bit. A futile pursuit, perhaps..
Diffstat (limited to 'Servers')
-rw-r--r--Servers/SystemServer/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Servers/SystemServer/main.cpp b/Servers/SystemServer/main.cpp
index fceac7a2b9..0cbc2f44d4 100644
--- a/Servers/SystemServer/main.cpp
+++ b/Servers/SystemServer/main.cpp
@@ -8,6 +8,8 @@
#include <sys/types.h>
#include <unistd.h>
+//#define SPAWN_MULTIPLE_VIRTUAL_CONSOLES
+
void start_process(const String& program, const Vector<String>& arguments, int prio, const char* tty = nullptr)
{
pid_t pid = 0;
@@ -89,8 +91,10 @@ int main(int, char**)
// NOTE: We don't start anything on tty0 since that's the "active" TTY while WindowServer is up.
start_process("/bin/TTYServer", { "tty1" }, highest_prio, "/dev/tty1");
+#ifdef SPAWN_MULTIPLE_VIRTUAL_CONSOLES
start_process("/bin/TTYServer", { "tty2" }, highest_prio, "/dev/tty2");
start_process("/bin/TTYServer", { "tty3" }, highest_prio, "/dev/tty3");
+#endif
// Drop privileges.
setgid(100);