summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-01 19:47:16 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-01 19:47:16 +0100
commit14aa8e3708ae7e82158e01e8b7957cd6dd691ffd (patch)
tree2248538214c7d3b2d19472058c0316739c0ed628 /Kernel
parent4d006de2b958ad32e6cd44d960af4a92af8fd583 (diff)
downloadserenity-14aa8e3708ae7e82158e01e8b7957cd6dd691ffd.zip
Kernel: Oops, SC_abort was actually calling sys$exit_thread()
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Syscall.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index 6e1dbcabce..14f85b4c39 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -102,11 +102,19 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F
process.tracer_trap(*current_thread, regs); // this triggers SIGTRAP and stops the thread!
}
- if (function == SC_exit)
+ switch (function) {
+ case SC_abort:
+ process.sys$abort();
+ break;
+ case SC_exit:
process.sys$exit(arg1);
- else
+ break;
+ case SC_exit_thread:
process.sys$exit_thread(arg1);
- VERIFY_NOT_REACHED();
+ break;
+ default:
+ VERIFY_NOT_REACHED();
+ }
}
if (function == SC_fork || function == SC_sigreturn) {