containers / containers/bubblewrap

Feature Question: Unshare vs Clone

Open
#776 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

Currently, bubblewrap uses the `clone` syscall to create a sub-process in a new namespace. However, the `unshare` syscall could also be used to move the current process into a namespace without having to create a sub-process. This would result in a faster startup time for bubblewrap (in my benchmarks ~30-50% less startup time) and avoids having an extra wrapper process for each bubblewrap.

- Question 1: Is there a reason for bubblewrap to use `clone` instead of `unshare`?

- Question 2: Would there be any issue with adding a flag for people who want to use `unshare` instead of `clone`? (I am considering implementing this for my own uses, but I wanted to check whether you would be receptive to a pull request for this and what you would want to see in such a pull request.)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.