diff options
author | Tom <tomut@yahoo.com> | 2020-12-01 15:44:52 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-02 13:02:04 +0100 |
commit | 4c1e27ec656d26e85d0a7a1991c26a67aed115a2 (patch) | |
tree | 139ffdb6bbc79e48656951c0ed8f9b27565a308c /Kernel/Process.cpp | |
parent | 601a688b6f7f064856e148061b9530aeff032a3e (diff) | |
download | serenity-4c1e27ec656d26e85d0a7a1991c26a67aed115a2.zip |
Kernel: Use TimerQueue for SIGALRM
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index cd65429ea5..c5a1d51e1f 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -367,6 +367,7 @@ Process::Process(RefPtr<Thread>& first_thread, const String& name, uid_t uid, gi Process::~Process() { ASSERT(thread_count() == 0); // all threads should have been finalized + ASSERT(!m_alarm_timer); { ScopedSpinLock processses_lock(g_processes_lock); @@ -596,6 +597,8 @@ void Process::finalize(Thread& last_thread) } } + if (m_alarm_timer) + TimerQueue::the().cancel_timer(m_alarm_timer.release_nonnull()); m_fds.clear(); m_tty = nullptr; m_executable = nullptr; |