summaryrefslogtreecommitdiff
path: root/libc/stdlib/system.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2018-07-04 17:55:37 +0200
committerWaldemar Brodkorb <wbrodkorb@conet.de>2018-08-10 16:02:45 +0200
commit606a8b28e4987e09572dd0c6b40546cdcbcc1bf7 (patch)
tree9946988cd11e3a870271b460e5f94fdb4ac8e55f /libc/stdlib/system.c
parent961c229bd19f48afff2cfbce6374b343fbd2e42f (diff)
nptl: Use vfork on MMU-less for system()
* libc/stdlib/system.c (FORK): Map to vfork if __ARCH_USE_MMU__ is defined. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
Diffstat (limited to 'libc/stdlib/system.c')
-rw-r--r--libc/stdlib/system.c5
1 files changed, 5 insertions, 0 deletions
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);