fork() now at least calls _kern_fork(), but would not even be complete

if that one worked.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8975 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-09-15 15:48:28 +00:00
parent f845dd4e4f
commit fbb0ac2170

View File

@ -7,16 +7,21 @@
#include <syscalls.h> #include <syscalls.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h>
#include <errno.h> #include <errno.h>
pid_t pid_t
fork(void) fork(void)
{ {
// ToDo: implement me thread_id thread = _kern_fork();
// ToDo: atfork() if (thread < 0) {
fprintf(stderr, "fork(): NOT IMPLEMENTED\n"); errno = thread;
return -1; return -1;
}
// ToDo: initialize child
// ToDo: atfork() support
return thread;
} }