kernel/x86_64: Terminate page faults in a waitpid-friendly way
This commit is contained in:
parent
e2eb9a92cb
commit
d63c8abbfd
@ -71,7 +71,10 @@ void decode_page_fault_error_code(u64 code)
|
|||||||
{
|
{
|
||||||
// FIXME: Kill this process with SIGSEGV once we have signals and all that.
|
// FIXME: Kill this process with SIGSEGV once we have signals and all that.
|
||||||
kerrorln("Current task %zu was terminated because of a page fault", Scheduler::current()->id);
|
kerrorln("Current task %zu was terminated because of a page fault", Scheduler::current()->id);
|
||||||
kernel_exit();
|
Scheduler::current()->state = ThreadState::Exited;
|
||||||
|
Scheduler::current()->status = 127;
|
||||||
|
kernel_yield();
|
||||||
|
unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU::print_stack_trace_at(regs);
|
CPU::print_stack_trace_at(regs);
|
||||||
|
Loading…
Reference in New Issue
Block a user