setns: Check the file descriptor type#1402
setns: Check the file descriptor type#1402rusty-snake wants to merge 1 commit intobytecodealliance:mainfrom
Conversation
… before passing it to setns
|
Could you say more about why it should be rustix's responsibility to do these checks? |
|
I'm coming a bit from the other direction. Why do we have two functions for |
|
In general, rustix tries to avoid making multiple syscalls per function, to be less surprising to users who know the syscalls, and to avoid the extra overhead for users that don't need it. I agree it's a little awkward that there are two functions here. Perhaps we should add a |
|
Ok, I broaden this discussion a bit more. I also plan to add
Unifying the later two into a new
¹ Where should the be places?
|
This could work.
I agree, it doesn't really fit in
This could work too. Are there any other functions that would belong in an |
Linux namespaces API:
|
|
@sunfishcode |
|
Superseded by #1437 |
… before passing it to setns
TODO: testing