summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-04 10:21:15 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-04 10:21:15 +0100
commit356abbb7ee9664a1d4ccf59863fc2329bab3c5c4 (patch)
treea2232ed76fd95f170b31d46516cfd71c4bb47005
parent9126d08a4318aa05a45dcf9f87c845219835dbc4 (diff)
downloadserenity-356abbb7ee9664a1d4ccf59863fc2329bab3c5c4.zip
Kernel: Process should disassociate from its TTY when it dies.
Just because we die doesn't mean we got waited on yet, so keeping around a dangling TTY pointer is just asking for trouble.
-rw-r--r--Kernel/Process.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index e1d3d1c46c..68dc757ce2 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -2170,6 +2170,7 @@ void Process::die()
{
set_state(Dead);
m_fds.clear();
+ m_tty = nullptr;
destroy_all_windows();
}