From 49c657154fd468fca323453c0e2d1cc560945efe Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Wed, 15 Jul 2026 21:21:18 +0000 Subject: [PATCH] urt: crti: Exit instead of an infinite loop Signed-off-by: Chloe M. --- service/urt/arch/amd64/crt/crti.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/service/urt/arch/amd64/crt/crti.S b/service/urt/arch/amd64/crt/crti.S index ef78700..a1cdb91 100644 --- a/service/urt/arch/amd64/crt/crti.S +++ b/service/urt/arch/amd64/crt/crti.S @@ -6,10 +6,16 @@ * Author: Chloe M. */ +#include + .text .globl _start _start: xor %rbp, %rbp /* Terminate callstack */ call Main /* Enter program main */ -1: pause - jmp 1b + + push %rax /* Push the status code */ + mov $SYS_EXIT, %rax /* Prepare the exit */ + pop %rdi /* Pop the status code */ + int $0x2E /* To the reaper queue we go */ + ud2