From: Matthias Kruk Date: Fri, 31 Jan 2020 11:23:55 +0000 (+0900) Subject: Add fork and execfve syscall stubs to userspace libc X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=a0c43a80469d816549aa93e2ad663af2c6a8e6cf;p=corax Add fork and execfve syscall stubs to userspace libc --- diff --git a/libc/syscall.S b/libc/syscall.S index 7d53714..9efebd8 100644 --- a/libc/syscall.S +++ b/libc/syscall.S @@ -222,3 +222,26 @@ cxsendrecv: popl %ebx ret + +.global fork +fork: + pushl %ebx + + movl $SYS_FORK, %eax + int $SYSCALL_POSIX + + popl %ebx + ret + +.global execfve +execfve: + pushl %ebx + + movl $SYS_EXECFVE, %eax + movl 8(%esp), %ebx + movl 12(%esp), %ecx + movl 16(%esp), %edx + int $SYSCALL_POSIX + + popl %ebx + ret