Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implements a clone fallback path when `clone3` is blocked with ENOSYS Removed the use of clone3 crate. Our usecase for the clone3 crate is very specific and do not need to support everything. I can easily replace the clone3 crate with a few lines of code, so I did it in this PR. We usually favors safe syscall wrappers like nix over libc, but I believe the save is worth it here. We use the raw clone syscall instead of glibc wrapper. Details are in the comments. Using raw syscalls for both clone and clone3 actually makes the code well organized. For our usecase, they share the input types. Unit tests using seccomp profile to simulate clone3 being blocked are added. Signed-off-by: yihuaf <[email protected]>
- Loading branch information