-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
fs: make process.stdout and stderr descend from Writable. #8828
Comments
+1. It also looks like the |
+1 on doing something here. As far as I understand it, the |
Hmmm, I was sure there was an older issue for this. I think it would be ideal to change it to use |
@Fishrock123 maybe there is, I found none mentioning |
|
Make the internal `SyncWriteStream` a proper `stream.Writable` subclass. This allows for quite a bit of simplification, since `SyncWriteStream` predates the streams2/streams3 implementations. Fixes: nodejs#8828
Suggested PR (that does nothing |
Is it related that
|
Make the internal `SyncWriteStream` a proper `stream.Writable` subclass. This allows for quite a bit of simplification, since `SyncWriteStream` predates the streams2/streams3 implementations. Fixes: #8828 PR-URL: #8830 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Make the internal `SyncWriteStream` a proper `stream.Writable` subclass. This allows for quite a bit of simplification, since `SyncWriteStream` predates the streams2/streams3 implementations. Fixes: nodejs#8828 PR-URL: nodejs#8830 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Make the internal `SyncWriteStream` a proper `stream.Writable` subclass. This allows for quite a bit of simplification, since `SyncWriteStream` predates the streams2/streams3 implementations. Fixes: #8828 PR-URL: #8830 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> (backport info) Refs: #9030
process.stdout
andprocess.stderr
are 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.stdout
andprocess.stderr
should 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.Socket
insteadnode/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
The text was updated successfully, but these errors were encountered: