-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
this won't work reliable (but it should according to the docs):
var empty = new Buffer(0)
process.stdout.write(empty, function() {
process.stderr.write(empty, function() {
process.exit(code);
});
});
Not all data is flushed when node.js ends and thus another process using its output will not get all written data.
It also doesn't help to use something like
stream.pipe(process.stdout);
stream.push(null);
That .end() throws and an finish is never emitted makes using process.stdout/.stderr something like lottery.
Also trying to workaround via
fs.createWritableStream(null, {fd:1});
leads to another bunch of problems like EAGAIN errors.
I would suggest to implement .end() and finish events so that both process.stdout and .stderr behave like any other stream.
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.