-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: allow reading umask in workers #25526
Conversation
cc @targos because of #25448 (comment) |
// The execution of this function itself should not cause any side effects. | ||
function wrapProcessMethods(binding) { | ||
function umask(mask) { | ||
// process.umask() is a read only operation in workers. |
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.
// process.umask() is a read only operation in workers. | |
// process.umask() is a read-only operation in workers. |
Refs: nodejs#25448 PR-URL: nodejs#25526 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Green CI: https://ci.nodejs.org/job/node-test-pull-request/20182/ Addressed the "read only" -> "read-only" nit when adding the commit metadata. |
@cjihrig I’m removing |
@addaleax that's fine. I was being overly conservative 😄 |
Oh perfect! Will this be backported to v11 (maybe even v10, although since it's behind a flag there not as big impact)? I just filed sindresorhus/make-dir#9 (with 6M weekly downloads), but that'll be fixed by this landing 🙂 |
My guess is that it will end up in Node 10 and up. |
Perfect, thanks for the info! |
Notable Changes: * events: * For unhandled `error` events with an argument that is not an `Error` object, the resulting exeption will have more information about the argument. #25621 * child_process: * When the `maxBuffer` option is passed, `stdout` and `stderr` will be truncated rather than unavailable in case of an error. #24951 * policy: * Experimental support for module integrity checks through a manifest file is implemented now. #23834 * n-api: * The `napi_threadsafe_function` feature is now stable. #25556 * report: * An experimental diagnostic API for capturing process state is available as `process.report` and through command line flags. #22712 * tls: * `tls.connect()` takes a `timeout` option analogous to the `net.connect()` one. #25517 * worker: * `process.umask()` is available as a read-only function inside Worker threads now. #25526 * An `execArgv` option that supports a subset of Node.js command line options is supported now. #25467 PR-URL: #25687
Notable Changes: * events: * For unhandled `error` events with an argument that is not an `Error` object, the resulting exeption will have more information about the argument. #25621 * child_process: * When the `maxBuffer` option is passed, `stdout` and `stderr` will be truncated rather than unavailable in case of an error. #24951 * policy: * Experimental support for module integrity checks through a manifest file is implemented now. #23834 * n-api: * The `napi_threadsafe_function` feature is now stable. #25556 * report: * An experimental diagnostic API for capturing process state is available as `process.report` and through command line flags. #22712 * tls: * `tls.connect()` takes a `timeout` option analogous to the `net.connect()` one. #25517 * worker: * `process.umask()` is available as a read-only function inside Worker threads now. #25526 * An `execArgv` option that supports a subset of Node.js command line options is supported now. #25467 PR-URL: #25687
I saw some chatter on this thread about backporting this to v10, and I wanted to check if that was still being considered. We use v10 worker threads and are trying to use a specific package that only supports up to v10, a dependency of which is trying to call No worries if not, just thought I'd check in! |
It doesn't look like it has been backported. I think you'd have to ask @nodejs/backporters if they intend to or not. |
@cjihrig awesome, thanks! That reference directs me to a 404 — is that a private team in the Node.js Github org? Not sure the correct process but happy to follow it. |
@dylburger that was just me pinging the team of people that handle most of the backporting of commits from master to the release branches. You don't have to do anything. |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes