From 606a8b28e4987e09572dd0c6b40546cdcbcc1bf7 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 4 Jul 2018 17:55:37 +0200 Subject: nptl: Use vfork on MMU-less for system() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libc/stdlib/system.c (FORK): Map to vfork if __ARCH_USE_MMU__ is defined. Signed-off-by: Mickaël Guêné Signed-off-by: Christophe Lyon --- libc/stdlib/system.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index 771c30e3f..4c010bb19 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -81,6 +81,7 @@ out: libc_hidden_proto(sigaction) libc_hidden_proto(waitpid) +#ifdef __ARCH_USE_MMU__ #if defined __ia64__ # define FORK() \ INLINE_SYSCALL (clone2, 6, CLONE_PARENT_SETTID | SIGCHLD, NULL, 0, \ @@ -92,6 +93,10 @@ libc_hidden_proto(waitpid) # define FORK() \ INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid) #endif +#else +# define FORK() \ + vfork() +#endif static void cancel_handler (void *arg); -- cgit v1.2.3