summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 848b6f869..e72890612 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -27,7 +27,6 @@
*
* Authors: Steve Reinhardt
* Ali Saidi
- * Korey Sewell
*/
#include <fcntl.h>
@@ -92,7 +91,9 @@ SyscallReturn
exitFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
- exitSimLoop("target called exit()", tc->getSyscallArg(0) & 0xff);
+ if (tc->exit()) {
+ exitSimLoop("target called exit()", tc->getSyscallArg(0) & 0xff);
+ }
return 1;
}