Linux Manual Pages development
 help / color / mirror / Atom feed
* man 2 unshare: UNSHARE_EMPTY_MNTNS
@ 2026-11-12 16:42 Niklas Hambüchen
  2026-11-19 23:22 ` Alejandro Colomar
  0 siblings, 1 reply; 2+ messages in thread
From: Niklas Hambüchen @ 2026-11-12 16:42 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

Dear man pages maintainers,

I just want to point out that unshare has a new flag in Linux >= 7.1:
UNSHARE_EMPTY_MNTNS

See e.g.
https://github.com/torvalds/linux/commit/9d4e752a24f740b31ca827bfab07010e4e7f34b0#diff-871f39f0834631ea368e8539ee88840ade11866cd6104e91543f9387dd1b8386R39-R52

"
This is useful for containers and sandboxes that want to
start with a minimal mount table and populate it from scratch rather
than inheriting and then tearing down the full mount tree.
"

Note a little quirk caused by this change:

This is the first `unshare` flag that isn't a `CLONE_*` one, so it breaks the existing invariant that all `unshare` flags are also valid `clone3` flags.
The commit remarks:

"
  * unshare flags share the bit space with clone flags but only apply to the
  * unshare syscall:
"

I guess that part isn't really relevant for the man page, but I thought to point it out on this list, for searchability of this fact.

Cheers,
Niklas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 16:42 man 2 unshare: UNSHARE_EMPTY_MNTNS Niklas Hambüchen
2026-11-19 23:22 ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox