Kill usermode process on exceptions.
This commit is contained in:
parent
e8845b5012
commit
4c71e65cc5
@ -105,6 +105,13 @@ void trap(registers_t *r) {
|
||||
if (r->int_no < ARRLEN(exception_messages)) {
|
||||
msg = exception_messages[r->int_no];
|
||||
}
|
||||
if (r->cs & 3) {
|
||||
// exception from user mode, kill offending process
|
||||
printk("Exception: ");
|
||||
printk(msg);
|
||||
printk("\n");
|
||||
killproc();
|
||||
}
|
||||
panic(msg);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user