-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
process: add get/set resuid #40581
base: main
Are you sure you want to change the base?
process: add get/set resuid #40581
Conversation
b3edf82
to
3690aaa
Compare
This PR adds support for getresuid and setresuid for js side
3690aaa
to
87270fd
Compare
It seems like |
@nodejs/process @nodejs/libuv Should this be in libuv? |
I don't think so based on similar functionality in |
Co-authored-by: Anna Henningsen <[email protected]>
Hi, I think this PR is read to review. |
@@ -175,6 +175,9 @@ if (credentials.implementsPosixCredentials) { | |||
process.getgid = credentials.getgid; | |||
process.getegid = credentials.getegid; | |||
process.getgroups = credentials.getgroups; | |||
if (!credentials.isApple) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of apis that may or may not exist depending on what platform you're on. My preference would be for the method to always be defined but throw a reasonable exception on unsupported platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a similar case out of my head, but probably there are some cases like this when it comes to compatibility with Windows? Maybe this could be handled similarily then?
In general, I also like the idea of a consistent API with reasonable exceptions. 👍
Co-authored-by: James M Snell <[email protected]>
This PR aims to support #40556
Test, lint, and build have been added and passed locally.