[libc-commits] [PATCH] D135752: [libc] Add a simple implementation of the posix_spawn function.
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Oct 12 10:19:54 PDT 2022
michaelrj added inline comments.
================
Comment at: libc/src/spawn/linux/posix_spawn.cpp:23-31
+pid_t fork() {
+#ifdef SYS_fork
+ return __llvm_libc::syscall_impl(SYS_fork);
+#elif defined(SYS_clone)
+ return __llvm_libc::syscall_impl(SYS_clone, SIGCHLD, 0);
+#else
+#error "SYS_fork or SYS_clone not available."
----------------
this feels like it might be better as a shared utility given that it's mostly the same as `unistd/linux/fork.cpp` (and same for the others below)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135752/new/
https://reviews.llvm.org/D135752
More information about the libc-commits
mailing list