Skip to content
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: normalize process.execPath in CreateProcessObject() #26002

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Feb 8, 2019

Directly normalize process.execPath using uv_fs_realpath
on OpenBSD before serializing it into the process object,
instead of using require('fs') to normalize and override
the path in bootstrap/node.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Directly normalize `process.execPath` using `uv_fs_realpath`
on OpenBSD before serializing it into the process object,
instead of using `require('fs')` to normalize and override
the path in `bootstrap/node.js`.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Feb 8, 2019
Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM but I wonder whether the original change for OpenBSD should have been pushed up to libuv.

@joyeecheung
Copy link
Member Author

@bnoordhuis
Copy link
Member

I second what Richard says. If uv_exepath() behaves differently from other unices on openbsd then it would be best to fix it in libuv, not here.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 9, 2019

I second what Richard says. If uv_exepath() behaves differently from other unices on openbsd then it would be best to fix it in libuv, not here.

I agree with that too. The only issue is that we don't test OpenBSD in the CI (AFAIK), so someone would have to set that up first to fix it with any confidence.

@joyeecheung
Copy link
Member Author

joyeecheung commented Feb 12, 2019

I agree this can be done in libuv instead, though this just moves what we already do to the C++. We can come back removing the special case code when this gets done in the upstream.

@joyeecheung
Copy link
Member Author

Landed in af83f6a

pull bot pushed a commit to Rachelmorrell/node that referenced this pull request Feb 12, 2019
Directly normalize `process.execPath` using `uv_fs_realpath`
on OpenBSD before serializing it into the process object,
instead of using `require('fs')` to normalize and override
the path in `bootstrap/node.js`.

PR-URL: nodejs#26002
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit that referenced this pull request Feb 13, 2019
Directly normalize `process.execPath` using `uv_fs_realpath`
on OpenBSD before serializing it into the process object,
instead of using `require('fs')` to normalize and override
the path in `bootstrap/node.js`.

PR-URL: #26002
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants