diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2020-01-19 01:21:14 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-01-18 23:51:22 +0100 |
commit | 544b8286da27eb224a7a0d5a4bdfb3e3a1a7d97c (patch) | |
tree | 47ea9b9f8f6238abac8ae0e936ff04d5ce909388 /Kernel | |
parent | 6466c3d750da0ddc46498c4e90f8ff8b0972ca65 (diff) | |
download | serenity-544b8286da27eb224a7a0d5a4bdfb3e3a1a7d97c.zip |
Kernel: Do not open stdio fds for kernel processes
Kernel processes just do not need them.
This also avoids touching the file (sub)system early in the boot process when
initializing the colonel process.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index ca8c1caceb..8f1aff6106 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -1283,7 +1283,7 @@ Process::Process(Thread*& first_thread, const String& name, uid_t uid, gid_t gid #endif m_fds[i] = fork_parent->m_fds[i]; } - } else { + } else if (ring == Ring3) { m_fds.resize(m_max_open_file_descriptors); auto& device_to_use_as_tty = tty ? (CharacterDevice&)*tty : NullDevice::the(); m_fds[0].set(*device_to_use_as_tty.open(O_RDONLY).value()); |