From 74493bf4460f4024e06760289735e9d5dcb9dc3f Mon Sep 17 00:00:00 2001 From: kaashoek Date: Fri, 25 Aug 2006 00:43:17 +0000 Subject: kill user process when it generates an unhandled trap (e.g., 13) fix bug in test code of malloc --- trap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'trap.c') diff --git a/trap.c b/trap.c index d201990..f26024b 100644 --- a/trap.c +++ b/trap.c @@ -126,8 +126,10 @@ trap(struct trapframe *tf) } cprintf("trap %d from cpu %d eip %x\n", v, cpu(), tf->eip); - if(curproc[cpu()]) + if(curproc[cpu()]) { cprintf("pid %d\n", curproc[cpu()]->pid); + proc_exit(); + } // panic("trap"); return; -- cgit v1.2.3