flatpak / flatpak-xdg-utils

Simple portal-based commandline tools for use inside flatpak sandboxes
GNU Lesser General Public License v2.1
34 stars 14 forks source link

flatpak-spawn: Add --share-pids option #41

Closed smcv closed 3 years ago

smcv commented 3 years ago

This option is similar to --expose-pids, except that instead of making the subsandbox use a nested pid namespace inside the parent's, it makes the subsandbox share the parent's pid namespace as-is, so that process IDs in the parent and the subsandbox are interchangeable. This will be useful if the parent and the subsandbox communicate via protocols that assume a global view of the process ID namespace, for example passing process IDs across an AF_UNIX socket or in shared memory.

See https://github.com/flatpak/flatpak/pull/4060 for the server side of this feature.

smcv commented 3 years ago

Ready for review, but should not be merged until after the API is finalized by merging https://github.com/flatpak/flatpak/pull/4060.