-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
fs: make process.stdout and stderr descend from Writable. #8828
Copy link
Copy link
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
process.stdoutandprocess.stderrare not implementing Stream 2 or 3 if they are redirected to a file. They are aSyncWriteStream:node/lib/internal/process/stdio.js
Line 149 in dc72779
This is were the choice is made.:
node/lib/internal/process/stdio.js
Lines 147 to 151 in dc72779
I know too little of the stdio sync/async situation to identify what should be preferred change. Ideally
process.stdoutandprocess.stderrshould come from the streams implementations, but I might be wrong.What are the implications of doing so? Why is this needed in the first place?
As an example, can we use
net.Socketinsteadnode/lib/internal/process/stdio.js
Lines 156 to 160 in dc72779
Issues related:
sindresorhus/is-stream#5
pinojs/pino#85
pinojs/pino#86
cc @jasnell @Fishrock123 @jsumners @catdad @sindresorhus @nodejs/streams