feat: add process termination codes and SYS_ABORT; whole-process abort() from any thread in libc and montauk-rt

This commit is contained in:
daniel committed 2026-10-14 07:32:15 +02:00
1 parent f8b8f9610f
commit 278b208258
15 files changed
+126 -37

No files matched your search

+5
View File
@@ -527,6 +527,11 @@ namespace montauk {
inline int kill(int pid) {
return (int)syscall1(montauk::abi::SYS_KILL, (uint64_t)pid);
}
// End the whole process from any thread (exit code TerminatedAborted).
[[noreturn]] inline void abort() {
syscall0(montauk::abi::SYS_ABORT);
__builtin_unreachable();
}
inline int setsession() {
return (int)syscall0(montauk::abi::SYS_SETSESSION);
}