Kernel: TTY now stores foreground process pid

this will be process pgid when we have process groups
This commit is contained in:
Bananymous
2023-07-24 22:28:58 +03:00
parent 522aa8e762
commit b576d373c4
2 changed files with 8 additions and 0 deletions

View File

@@ -150,6 +150,9 @@ namespace Kernel
m_fixed_width_allocators.clear();
m_general_allocator.clear();
if (m_tty && m_tty->foreground_process() == pid())
m_tty->set_foreground_process(0);
s_process_lock.lock();
for (size_t i = 0; i < s_processes.size(); i++)
if (s_processes[i] == this)