-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setns: Check the file descriptor type #1402
base: main
Are you sure you want to change the base?
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:
|
… before passing it to setns
TODO: testing