]> git.corax.cc Git - corax/commitdiff
Call process_fork() from sys_fork() and sys_vfork()
authorMatthias Kruk <m@m10k.eu>
Wed, 30 Oct 2019 08:08:18 +0000 (17:08 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 30 Oct 2019 08:08:18 +0000 (17:08 +0900)
kernel/core/posixcall.c

index 7e0ca4cc35a162273eb61277ea08886a5d953665..ffae24d23013184dc298f3fba8a4731d60c25174 100644 (file)
@@ -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)