Skip to content
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

stdout not usable after pipeline? #33237

Closed
ronag opened this issue May 4, 2020 · 7 comments
Closed

stdout not usable after pipeline? #33237

ronag opened this issue May 4, 2020 · 7 comments
Labels
stream Issues and PRs related to the stream subsystem.

Comments

@ronag
Copy link
Member

ronag commented May 4, 2020

#33166 (comment) @jasnell

I don't know if it's relevant to this specific issue, but I did notice that between 13.11 and and 13.12, when any stream piping to process.stdout or process.stderr closes, process.stdout/process.stderr end up closing allowing no further output. This behavior is carried over into 14.x and is on all platforms...

To give it a quick test, nvm use 13.11 and try...

$ node
Welcome to Node.js v13.11.0
Type ".help" for more information.
> const w = new stream.PassThrough()
undefined
> stream.pipeline(w, process.stdout, () => {})
<truncated>
> w.end('hello')
<truncated>

You'll see that on 13.11, process.stdout is still usable while on anything beyond 13.12, it is not.

@ronag ronag added the stream Issues and PRs related to the stream subsystem. label May 4, 2020
@ronag
Copy link
Member Author

ronag commented May 4, 2020

I was suspecting #32373, but that was included in 13.13...

@ronag
Copy link
Member Author

ronag commented May 4, 2020

@jasnell Are you sure this broke on 13.12? I can't reproduce it on 13.12, only 13.13. I think it's the referenced commit above on 13.13.

@ronag
Copy link
Member Author

ronag commented May 4, 2020

@vweevers Thoughts?

#32363
#32363 (comment)
#32373

@jasnell
Copy link
Member

jasnell commented May 4, 2020

Ah, yep yep, you're right, 13.13. Must have selected the wrong version earlier switching between them. The regression starts in 13.13

@vweevers
Copy link
Contributor

vweevers commented May 5, 2020

To avoid going in circles, could you explain why you consider this to be an issue? Because it contradicts decisions made in #23053, which removed the following restrictions on stdout/stderr:

  1. They cannot be closed (end() will throw).
  2. They will never emit the 'finish' event.

@ronag
Copy link
Member Author

ronag commented Jun 13, 2020

@jasnell

@ronag
Copy link
Member Author

ronag commented Jun 28, 2020

This has become stale. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants