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