kernel: Panic when PID 1 exits/crashes

This commit is contained in:
apio 2023-07-10 13:04:47 +02:00
parent e3552d9df0
commit 40413eee18
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -71,6 +71,7 @@ Result<SharedPtr<VFS::Inode>> Thread::resolve_atfile(int dirfd, const String& pa
[[noreturn]] void Thread::exit_and_signal_parent(u8 _status) [[noreturn]] void Thread::exit_and_signal_parent(u8 _status)
{ {
if (this->id == 1) fail("the init process exited");
if (is_kernel) state = ThreadState::Dying; if (is_kernel) state = ThreadState::Dying;
else else
{ {