diff --git a/code/userprog/exception.cc b/code/userprog/exception.cc index 7dc3e42..df7ca0e 100644 --- a/code/userprog/exception.cc +++ b/code/userprog/exception.cc @@ -131,6 +131,8 @@ ExceptionHandler (ExceptionType which) #ifdef CHANGED case SC_Exit: { + while (1) + currentThread->Yield(); int ret = machine->ReadRegister(4); printf("Exit code %d\n", ret); interrupt->Powerdown();