-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
options/posix: sys_dup should not accept a flags
parameter
#534
Comments
Hm? What prevents you from implementing |
What should the value of newfd be? |
That's indeed an issue. I guess we should simply use |
That alters flags to add CLOEXEC. Matt discovered that the only use of the flags argument in sys_dup is in the managarm sysdep (the rest calls dup with zero), so we could just add an overload in that sysdep instead of adding the argument to the sysdep API |
Well, there is only a single flag that can be set ( |
The limit of which flags happen here could change in the future, though. It's more forward compatible to just refactor the Managarm sysdep |
I would also prefer to get rid of that parameter, but changing the other sysdeps might be a bit messy. |
why? AFAIK, this kind of change is why they're in tree |
Instead, there should be a
sys_dup3
syscall as per Linux.Alternatively we could keep it how it is and inside the Linux sysdeps use a
fnctl(F_DUPFD_CLOEXEC)
call to handle it.The text was updated successfully, but these errors were encountered: