-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
* *Guy*: | ||
* let's reach out to library maintainers, and see how they feel about getting | ||
their work brought into core (@guybedord). | ||
* this could be a great way to get more Node contributors; perhaps |
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?
* argument parsing could be made better than `process.argv.slice(2)`. | ||
|
||
* *Bryan*: | ||
* would like to see `execvp` implemented, this could be a good alternative |
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:
try{
child_process.execSync(...);
process.exit(0)
} catch(e) {
process.exit(e.status)
}
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 into execvp()
, 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.
Was great to join in on this discussion. Look forward to continuing to follow these developments.
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.
Looks great, huge thanks for taking notes @bcoe!
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.
LGTM (was not at the meeting but seems like a good overview)
here are the minutes from yesterday, please:
Attendees:
@boneskull, @bcoe, @iansu, @guybedford, @oludiro, @ErickWendel, @ruyadorno, @MichelLopez, @bengl