From: Matthias Kruk Date: Wed, 30 Oct 2019 08:08:18 +0000 (+0900) Subject: Call process_fork() from sys_fork() and sys_vfork() X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=aaaab731948a826e4a2436404259fc199dd3e762;p=corax Call process_fork() from sys_fork() and sys_vfork() --- diff --git a/kernel/core/posixcall.c b/kernel/core/posixcall.c index 7e0ca4c..ffae24d 100644 --- a/kernel/core/posixcall.c +++ b/kernel/core/posixcall.c @@ -24,12 +24,16 @@ int sys_exit(int status) int sys_fork(void) { - return(-ENOSYS); + /* + * process_fork() always forks the calling process, so + * it doesn't get told which process to fork + */ + return(process_fork(0)); } int sys_vfork(void) { - return(-ENOSYS); + return(process_fork(1)); } int sys_wait(int *status)