Kernel/init: /dev/tty is now custom symlink to controlling terminal

kernel now passes the name of default console to init process so init
knows which file to open as stdio. before /dev/tty was referencing the
system wide current terminal which was inherited from cmdline. This
doesn't work anymore as we have pseudo terminals implemented that can
chage the current terminal during runtime :D
This commit is contained in:
2024-11-17 22:38:52 +02:00
parent 458a362f98
commit aaff5a65e1
4 changed files with 51 additions and 38 deletions

View File

@@ -185,7 +185,7 @@ namespace Kernel
BAN::ErrorOr<long> sys_load_keymap(const char* path);
TTY& tty() { ASSERT(m_controlling_terminal); return *m_controlling_terminal; }
BAN::RefPtr<TTY> controlling_terminal() { return m_controlling_terminal; }
static Process& current() { return Thread::current().process(); }