-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
child_process: expose ChildProcess constructor #1760
Conversation
var common = require('../common'); | ||
var child_process = require('child_process'); | ||
|
||
assert.equal(typeof child_process.ChildProcess, 'function'); |
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.
we should flesh out this test file a bit – make sure we can instantiate it, call spawn on it, and call kill on it.
Absolutely. Definitely needs more tests. Wanted to get the initial implementation up to make sure this direction was ok. I'll get more pushed up tonight. |
@@ -0,0 +1,108 @@ | |||
'use strict'; | |||
|
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'd like it if we could move the exports up here, a la:
module.exports = {SocketListSend, SocketListReceive}
(We have shorthand object literals now, so we can take advantage of that!)
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.
Strange, keep getting a lint error when using this. https://gist.github.com/evanlucas/0920f2b5cd90340cca27
Any ideas @silverwind? I've tried adding in an object-shorthand
rule, but it didn't seem to do anything
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.
@evanlucas add objectLiteralShorthandProperties: true
to ecmaFeatures
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.
score. Thanks!!!
This looks great! Thanks for putting it together. |
822d38e
to
ada79e5
Compare
Ok, added more to the tests |
Ok, I ran another CI run to see if it was this PR causing issues. https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/703/ I am not sure if it is or not. Seems to be some failures on win2008r2 still |
@evanlucas these look suspiciously like the ones that were failing before. Maybe start off a CI off master to be sure. |
Yea, seeing if I can reproduce locally now |
CI off master to compare: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/704/ |
Tests passed locally on windows 7 for me. I did get a dialog asking to allow access on one of the tests (not sure which one though) |
#1777 (comment) explains the win2008 failures. New CI: https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/708/ |
Nice, CI seems to like it |
This LGTM. |
Required to make linting pass for using object literal shorthand properties. PR-URL: nodejs#1760 Reviewed-By: Chris Dickinson <[email protected]>
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]>
Awesome stuff. Thanks! |
Required to make linting pass for using object literal shorthand properties. PR-URL: nodejs/node#1760 Reviewed-By: Chris Dickinson <[email protected]>
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]>
In hindsight I would regard this as really bad decision just to have sugar for extension. This doesn't allow a decent rewrite of the child_process module which I will attempt now and wanted to do behind |
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
Related: #1751
Definitely needs more tests for the internal modules.