1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 09:27:35 +00:00

Server: Add TTYServer, a rudimentary text console manager

This should probably call out to a login program at some point. Right now
it just puts a root terminal on tty{1,2,3}.

Remember not to leave your Serenity workstation unattended!
This commit is contained in:
Conrad Pankoff 2019-08-12 21:24:11 +10:00 committed by Andreas Kling
parent 072bf8cbb9
commit 67a4256a98
5 changed files with 63 additions and 1 deletions

View file

@ -142,11 +142,32 @@ VFS* vfs;
auto* system_server_process = Process::create_user_process("/bin/SystemServer", (uid_t)100, (gid_t)100, (pid_t)0, error, {}, {}, tty0);
if (error != 0) {
dbgprintf("init_stage2: error spawning SystemServer: %d\n", error);
kprintf("init_stage2: error spawning SystemServer: %d\n", error);
hang();
}
system_server_process->set_priority(Process::HighPriority);
auto* tty1_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty1" }, {}, tty1);
if (error != 0) {
kprintf("init_stage2: error spawning TTYServer for tty1: %d\n", error);
hang();
}
tty1_process->set_priority(Process::HighPriority);
auto* tty2_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty2" }, {}, tty2);
if (error != 0) {
kprintf("init_stage2: error spawning TTYServer for tty2: %d\n", error);
hang();
}
tty2_process->set_priority(Process::HighPriority);
auto* tty3_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty3" }, {}, tty3);
if (error != 0) {
kprintf("init_stage2: error spawning TTYServer for tty3: %d\n", error);
hang();
}
tty3_process->set_priority(Process::HighPriority);
current->process().sys$exit(0);
ASSERT_NOT_REACHED();
}