-
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
Expose the ChildProcess constructor #1751
Comments
Is there any reason it is not currently exposed? |
Prior discussion: nodejs/node-v0.x-archive#2419 |
In the last 3 years, I've changed my mind on this, having had to jump through hoops to get at |
Thanks. Since we now we have internal modules, would it be worth refactoring |
@evanlucas It's not an "internal module", though. It's a class in JavaScript-land. I need access to it in non- |
I think one of the problems is that the signature of the On Wed, May 20, 2015 at 3:07 PM, isaacs [email protected] wrote:
|
@isaacs can't you just wrap |
@isaacs good point. |
@vkurchatkin No. I'd have to also wrap exports.exec, exports.fork, etc. @piscisaureus Ok, so, let's specify it :) It hasn't changed since (at least) 0.8, I think it's relatively stable at this point. |
I'd support throwing the class into an internal module and then exposing it through the public |
@chrisdickinson I still need to be able to get at the class for spawn-wrap, though. Wherever the code lives, |
@isaacs Oh yeah, you would be able to – via Edit: to be clear, I'm suggesting that we rip ChildProcess out of |
EDIT:
Missed that, sorry. Yeah, +1 |
@chrisdickinson That sounds ideal. |
Creates two new internal modules (child_process and socket_list) for better readability. Exposes the ChildProcess constructor from the child_process module so one can now `require(‘child_process’).ChildProcess` Fixes: nodejs#1751 PR-URL: nodejs#1760 Reviewed-By: Chris Dickinson <[email protected]>
Closed via #1760 |
I made a quick polyfill for anyone needing to support older Node.js versions too: https://github.com/sindresorhus/child-process-ctor |
Creates two new internal modules (child_process and socket_list) for better readability. Exposes the ChildProcess constructor from the child_process module so one can now `require(‘child_process’).ChildProcess` Fixes: nodejs/node#1751 PR-URL: nodejs/node#1760 Reviewed-By: Chris Dickinson <[email protected]>
So I don't have to do stuff like this: https://github.com/isaacs/spawn-wrap/blob/master/index.js#L33-L38
The text was updated successfully, but these errors were encountered: