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:
@@ -255,6 +255,10 @@ static void init2(void*)
|
||||
TTY::initialize_devices();
|
||||
|
||||
MUST(Process::create_userspace({ 0, 0, 0, 0 }, "/usr/bin/init"_sv, {}));
|
||||
|
||||
auto console_path = MUST(BAN::String::formatted("/dev/{}", cmdline.console));
|
||||
auto console_path_sv = console_path.sv();
|
||||
MUST(Process::create_userspace({ 0, 0, 0, 0 }, "/usr/bin/init"_sv, BAN::Span<BAN::StringView>(&console_path_sv, 1)));
|
||||
}
|
||||
|
||||
extern "C" void ap_main()
|
||||
|
||||
Reference in New Issue
Block a user