From d2f4e62bf1a13c4ee5ef203a83a6e70804a49e93 Mon Sep 17 00:00:00 2001
From: a2-stratford <alexander3.stratford@live.uwe.ac.uk>
Date: Tue, 3 Dec 2019 18:14:12 +0000
Subject: [PATCH] Update syscall.c

---
 userprog/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/userprog/syscall.c b/userprog/syscall.c
index 210d7a8..f4b3381 100644
--- a/userprog/syscall.c
+++ b/userprog/syscall.c
@@ -69,7 +69,7 @@ syscall_handler (struct intr_frame *f UNUSED)
     break;
   default:
     printf ("WARNING: Invalid Syscall (%d)\n", syscall_number);
+    thread_exit ();
   }
   // TODO: remove this call to exit as we don't want all syscalls to make the thread exit
-  thread_exit ();
 }
-- 
GitLab