Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs: minutes for node+js interactive meeting #6
docs: minutes for node+js interactive meeting #6
Changes from all commits
19210fa
28919a0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is it a concern that the Windows process model doesn't have anything like Unix exec, so this is likely to be unix only?
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.
cc @bengl ^
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.
Sam and I ended up discussing this in person. The short answer to Sam's question is: Yes.
We may be able to do something that behaves similarly enough for the use-cases we're aiming for.
Here's how things seem to have worked (or not) in python-land (thanks Sam for sending these to me!): https://stackoverflow.com/questions/7004687/os-exec-on-windows https://bugs.python.org/issue9148
So yes it might be the case that this needs to be a UNIX-only feature (there is some precedent for UNIX-only features in Node.js).
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 sure what is being looked for from
execvp()
. Since "emulation" of exec on Windows is trivial:its not at all useful (above is basically what python et al does).
The only thing
execvp
offers over execSync is true process replacement, which isn't part of the Win32 process model. I have sometimes wished for this, but since its not portable I just figured out other ways.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 think some of the early feedback from the tooling user-feedback effort is that we want LESS platform specific behaviour versus more.
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.
@mhdawson Could something like
execvp
be implemented in a native module? Is there a precedent for something like that, where Node.js provides a hook for native modules, but no corresponding JS API surface? Is this a terrible idea?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.
@boneskull Depending on the complexity you want,
execvp()
should be pretty easy to implement as a native module, even without any hooks from Node.js. You don’t have to worry about options like environment variables or working directories, since you can set any of these from the running process before jumping intoexecvp()
, and IPC shouldn’t be a concern either.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.
@bengl Would that ^ work for you?
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.
It already exists as several native module: https://www.npmjs.com/package/native-exec, https://www.npmjs.com/package/kexec, and probably more.
I'd rather see it in core so that userland native addons aren't necessary to get this done. I don't think process management functionality should be relegated to userland.
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.
@dshaw it came up in the tooling meeting that it might be good to reach out to library maintainers who are interested in moving some of their work to Node.js core; might dovetail with community and mentorship work?