Repository navigation
Refactor RealEnvStore methods to use uv_os_getenv/setenv/unsetenv #27211
Copy link
Copy link
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
Activity
- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
on Apr 13, 2019 Prior work: #14641
It seems easier to refactor
uv_os_setenvanduv_os_unsetenv,uv_os_getenvis trickier due to how the buffer allocation is handled - the caller needs to retry when the allocated buffer is not large enough.Hi, It seems to be a good item for me as a first timer. I will work one this and will share the updates soon.
Modified as Joyee Cheung suggested and tested by following contributors guide.
Created pull request: #27310
19 remaining items
- added 10 commits that reference this issue
on Aug 20, 2019 - added a commit that references this issue
on Sep 20, 2019 - added a commit that references this issue
on Sep 25, 2019 - added a commit that references this issue
on Jul 27, 2026
Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
From a glance I think the uv_os_* methods are adequate to replace our conditional switches in the RealEnvStore methods.
I think this is a good first issue if you are familiar with C++ and has some idea on how to use libuv methods, but you may need to read into the libuv implementation to make sure the refactor does not change the functionality.
Pointers:
node/src/node_env_var.cc
Line 71 in dfd7e99
node/src/node_env_var.cc
Line 107 in dfd7e99
node/src/node_env_var.cc
Line 123 in dfd7e99
node/src/node_env_var.cc
Line 146 in dfd7e99
docs:
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_getenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_setenv
http://docs.libuv.org/en/v1.x/misc.html?highlight=uv_os_getenv#c.uv_os_unsetenv