Uh oh!
There was an error while loading. Please reload this page.
Conversation
cjihrig
commented
Sep 9, 2017
This should have a test. #13983 can probably help with that. We should also document the behavior. It might also be better if we can do this without the Windows check. |
I missed the entire test generation section of the contribution doc. First time at this. *Edit: I checked in a test. Thanks for the gentle reminder/nudge. In the spirit of this being my first attempt at a contribution it is about as complex as the actual code change but hopefully sufficient. On to documentation. |
ghost
commented
Sep 9, 2017
RE: Not doing the platform check - do you want me to just explicitly set it false and document that shell isn't supported for fork? |
cjihrig
commented
Sep 10, 2017
@agresnel I think that based on #13983 (comment), that should be fine. Thanks for taking care of this. |
cjihrig
left a comment
There was a problem hiding this comment.
A couple comments. I think you might want to consider something like this for the test:
'use strict';// Refs: https://github.com/nodejs/node/issues/13983// This test verifies that the shell option is not supported by fork().require('../common');constassert=require('assert');constcp=require('child_process');if(process.argv[2]===undefined){cp.fork(__filename,['$foo'],{shell: true,env: {foo: 'bar'}});}else{assert.strictEqual(process.argv[2],'$foo');}I only tried this test on macOS. You probably need to conditionally use %foo% instead of $foo on Windows.
| [`ChildProcess`][] will have an additional communication channel built-in that | ||
| allows messages to be passed back and forth between the parent and child. See | ||
| [`subprocess.send()`][] for details. | ||
| [`subprocess.send()`][] for details. |
| @@ -0,0 +1,29 @@ | |||
| // Copyright Joyent, Inc. and other Node contributors. | |||
There was a problem hiding this comment.
New files don't need this copyright header. You can remove it.
| const child_process = require('child_process'); | ||
| const fixtures = require('../common/fixtures'); | ||
| //As per: https://github.com/nodejs/node/issues/13983 should produce no error output |
There was a problem hiding this comment.
Lines should be wrapped at 80 characters too. make lint should have caught this.
Fishrock123
commented
Sep 11, 2017
The PR owner's account appears to have been deleted. @cjihrig if you are interested in this you may want to take their commit and make a new PR from it. |
cjihrig
commented
Sep 11, 2017
@Fishrock123 thanks for the heads up. Will do. |
cjihrig
commented
Sep 12, 2017
Moved to #15352 |
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: nodejs#15299Fixes: nodejs#13983 PR-URL: nodejs#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit verifies that the child_process fork() method does not honor the shell option. Refs: nodejs#15299 PR-URL: nodejs#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: nodejs/node#15299Fixes: nodejs/node#13983 PR-URL: nodejs/node#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit verifies that the child_process fork() method does not honor the shell option. Refs: nodejs/node#15299 PR-URL: nodejs/node#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: #15299Fixes: #13983 PR-URL: #15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: nodejs/node#15299Fixes: nodejs/node#13983 PR-URL: nodejs/node#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit verifies that the child_process fork() method does not honor the shell option. Refs: nodejs/node#15299 PR-URL: nodejs/node#15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: #15299Fixes: #13983 PR-URL: #15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: #15299Fixes: #13983 PR-URL: #15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: #15299Fixes: #13983 PR-URL: #15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fixes: #13983
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
child_process