diff options
| author | Robert Morris <rtm@csail.mit.edu> | 2019-06-04 11:31:50 -0400 |
|---|---|---|
| committer | Robert Morris <rtm@csail.mit.edu> | 2019-06-04 11:31:50 -0400 |
| commit | cff3ce6e04ce4a353324630df788df21566807a6 (patch) | |
| tree | 31040a8262b6de165a2f1d6cc7ead1db33e67a80 /trap.c | |
| parent | 0e131b226336808c135795f5b9d7defc5a58b2ae (diff) | |
| download | xv6-labs-2022-cff3ce6e04ce4a353324630df788df21566807a6.tar.xz xv6-labs-2022-cff3ce6e04ce4a353324630df788df21566807a6.zip | |
more sbrk fixes
Diffstat (limited to 'trap.c')
| -rw-r--r-- | trap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -57,9 +57,12 @@ usertrap(void) } else { printf("usertrap(): unexpected scause 0x%x pid=%d\n", r_scause(), p->pid); printf(" sepc=%p stval=%p\n", r_sepc(), r_stval()); - panic("usertrap"); + p->killed = 1; } + if(p->killed) + exit(); + usertrapret(); } |
