From a0e60c6d2e0839e3f87b1e0ac3af4be838b7c9ab Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 5 Mar 2003 10:28:53 +0000 Subject: Default to using fork() for vfork() when no arch specific implementation of vfork is present. --- libc/sysdeps/linux/common/Makefile | 2 +- libc/sysdeps/linux/common/vfork.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 libc/sysdeps/linux/common/vfork.c (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile index d51fc4281..064626050 100644 --- a/libc/sysdeps/linux/common/Makefile +++ b/libc/sysdeps/linux/common/Makefile @@ -25,7 +25,7 @@ CSRC= waitpid.c getdnnm.c gethstnm.c getcwd.c ptrace.c \ cmsg_nxthdr.c longjmp.c open64.c ftruncate64.c mmap64.c \ truncate64.c getrlimit64.c setrlimit64.c creat64.c \ llseek.c pread_write.c _exit.c sync.c getdirname.c \ - sendfile64.c xstatconv.c getdents.c getdents64.c + sendfile64.c xstatconv.c getdents.c getdents64.c vfork.c ifneq ($(strip $(EXCLUDE_BRK)),y) CSRC+=sbrk.c endif diff --git a/libc/sysdeps/linux/common/vfork.c b/libc/sysdeps/linux/common/vfork.c new file mode 100644 index 000000000..ba4f042ca --- /dev/null +++ b/libc/sysdeps/linux/common/vfork.c @@ -0,0 +1,8 @@ +/* Trivial implementation for arches that lack vfork */ +#include +#include + +pid_t vfork(void) +{ + return fork(); +} -- cgit v1.2.3