Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1018,3 +1018,17 @@ specific implementations. It would be much nicer and universally
applicable if such a check could be done generically. It would
probably suffice to provide an `ioctl()` call on the `pidns` file
descriptor that reveals this kind of information in some form.

### A way to iterate process file descriptors without /proc

[x] A way to iterate process file descriptors without needing
Comment on lines +1022 to +1024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### A way to iterate process file descriptors without /proc
[x] A way to iterate process file descriptors without needing
### A way to iterate over process file descriptors without /proc
A way to iterate over process file descriptors without needing

`/proc` mounted. Could be an `ioctl()` which takes a buffer,
size and a `last_fd` argument and fills the buffer with fd
numbers after the provided `last_fd`.

**Use-Case**: In `mkosi-sandbox` and other sandboxing tools
that let you set up an arbitrary sandbox, we can't rely on the
sandbox having `/proc` mounted, yet we still need to be able to
do systemd's fd packing algorithm. This requires being able to
iterate over all inherited fds in a somewhat efficient manner
without having `/proc` mounted.