2 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7 #include <sys/syscall.h>
9 #if (defined __NR_vfork || defined __NR_clone || (defined __ARCH_USE_MMU__ && defined __NR_fork)) && (defined __USE_BSD || defined __USE_XOPEN_EXTENDED)
11 extern __typeof(vfork) __vfork attribute_hidden;
13 # if defined __NR_clone && !defined __NR_vfork
15 # include <sys/types.h>
19 pid_t pid = INLINE_SYSCALL(clone, 4, SIGCHLD,
28 # elif defined __NR_vfork
29 # define __NR___vfork __NR_vfork
30 _syscall0(pid_t, __vfork)
32 /* Trivial implementation for arches that lack vfork */
38 strong_alias(__vfork,vfork)
39 libc_hidden_weak(vfork)