Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/fork.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 364 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 /*
2 * fork.c
3 *
4 * This is normally just a syscall stub, but at least one system
5 * doesn't have sys_fork, only sys_clone...
6 */
7
8 #include <sys/syscall.h>
9 #include <signal.h>
10 #include <unistd.h>
11 #include <sched.h>
12 #include <klibc/sysconfig.h>
13
14 #if !_KLIBC_NO_MMU && !defined(__NR_fork)
15
16 pid_t fork(void)
17 {
18 return __clone(SIGCHLD, 0);
19 }
20
21 #endif /* __NR_fork */