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