Kernel: Implement static Process::kill()

This allows killing processes even when there does not exist a current
thread.
This commit is contained in:
2024-09-24 13:16:43 +03:00
parent 1b0086217c
commit 348d04f7f5
3 changed files with 22 additions and 10 deletions

View File

@@ -273,7 +273,7 @@ namespace Kernel
// ^C
if (ch == '\x03')
{
if (auto ret = Process::current().sys_kill(-m_foreground_pgrp, SIGINT); ret.is_error())
if (auto ret = Process::kill(-m_foreground_pgrp, SIGINT); ret.is_error())
dwarnln("TTY: {}", ret.error());
return;
}