Fix fork on aarch64

This commit is contained in:
2026-01-17 15:07:16 -05:00
parent ed7a811736
commit ea0ec6a818

View File

@@ -57,9 +57,10 @@ intptr_t read(int32_t fd, const void* buf, intptr_t size){
#define CLONE_CHILD_SETTID 0x1000000 #define CLONE_CHILD_SETTID 0x1000000
#define CLONE_CHILD_CLEARTID 0x200000 #define CLONE_CHILD_CLEARTID 0x200000
#define SIGCHLD 0x11
uint32_t fork(){ uint32_t fork(){
long int rtn; long int rtn;
long int flags = CLONE_CHILD_CLEARTID | CLONE_CHILD_SETTID; long int flags = CLONE_CHILD_CLEARTID | CLONE_CHILD_SETTID | SIGCHLD;
asm volatile ( asm volatile (
// Assembly Instructions // Assembly Instructions
"mov x8, #220\n" // Syscall number for 'clone' is 220 in AArch64 "mov x8, #220\n" // Syscall number for 'clone' is 220 in AArch64