-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Conversation
@@ -0,0 +1,4 @@ | |||
var N = 0; |
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.
What's this for?
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.
Fuck, sec (edit: wanted it to write multiple multiple messages, but I ditched it, it's irrelevant here).
forked child processes share the stdout and stderr with the parent, use the ipc channel |
@ry I don't want to use it for communication but for logging. |
@ry The documentation clearly say:
If this is not a documentation issue, then In node v0.7 the silent option would then be used to determin if the pump should be created. |
I have a fix upcoming, will pull request soon and link here |
This test passes with #2454 applied. |
@mmalecki Can I close this? If I read the bug report right, this is no longer an issue with v0.8. |
@bnoordhuis you can close it or pull it (if there's no test for that). |
I'm ok with the test, but are you sure there isn't already a test we can just add stdout/stderr checking into? |
The test needs a patch to work with v0.8 (see below) but we already have a test for that, simple/test-child-process-silent. diff --git a/test/simple/test-child-process-fork-stdout.js b/test/simple/test-child-process-fork-stdout.js
index 8f92ccb..05967e5 100644
--- a/test/simple/test-child-process-fork-stdout.js
+++ b/test/simple/test-child-process-fork-stdout.js
@@ -27,7 +27,8 @@ var common = require('../common');
var stdout = '';
var stderr = '';
-var child = fork(path.join(common.fixturesDir, 'stdout-stderr-output'));
+var filename = path.join(common.fixturesDir, 'stdout-stderr-output');
+var child = fork(filename, {silent:true});
child.stdout.on('data', function (chunk) {
stdout += chunk; |
This test currently fails.
@piscisaureus said that
child_process.fork
should return a child withstdout
andstderr
, so I assume it's a bug. Currently child has onlystdin
property.