mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:18:12 +00:00
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..
This commit is contained in:
parent
a48feea1e3
commit
bd45a55d86
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,8 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.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)
|
void start_process(const String& program, const Vector<String>& arguments, int prio, const char* tty = nullptr)
|
||||||
{
|
{
|
||||||
pid_t pid = 0;
|
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.
|
// 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");
|
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", { "tty2" }, highest_prio, "/dev/tty2");
|
||||||
start_process("/bin/TTYServer", { "tty3" }, highest_prio, "/dev/tty3");
|
start_process("/bin/TTYServer", { "tty3" }, highest_prio, "/dev/tty3");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Drop privileges.
|
// Drop privileges.
|
||||||
setgid(100);
|
setgid(100);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue