1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Rework process states to make a bit more sense.

Processes are either alive (with many substates), dead or forgiven.
A dead process is forgiven when the parent waitpid()s on it.
Dead orphans are also forgiven.

There's a lot of work to be done around this.
This commit is contained in:
Andreas Kling 2018-11-07 18:30:59 +01:00
parent 71bffa9864
commit 678882e020
4 changed files with 154 additions and 93 deletions

View file

@ -147,7 +147,7 @@ void exception_6_handler(RegisterDump& regs)
}
HANG;
Process::processDidCrash(current);
current->crash();
}
// 13: General Protection Fault
@ -176,7 +176,7 @@ void exception_13_handler(RegisterDumpWithExceptionCode& regs)
HANG;
}
Process::processDidCrash(current);
current->crash();
}
// 14: Page Fault
@ -232,7 +232,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs)
if (response == PageFaultResponse::ShouldCrash) {
kprintf("Crashing after unresolved page fault\n");
Process::processDidCrash(current);
current->crash();
} else if (response == PageFaultResponse::Continue) {
#ifdef PAGE_FAULT_DEBUG
dbgprintf("Continuing after resolved page fault\n");