Skip to content

Conversation

@barucden
Copy link
Contributor

Replaces println(stdin.buffer, ...) with a redirect_stdin approach.

@vtjnash Could you check the stdin redirection? I couldn't make it work with Base.BufferStream.

Fixes #2961

Replaces `println(stdin.buffer, ...)` with a `redirect_stdin` approach.
@IanButterworth
Copy link
Member

Thanks for fixing this!

@vtjnash
Copy link
Member

vtjnash commented Mar 24, 2022

BufferStream should also work, but requires using the internal Base._redirect_io_global function

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@barucden
Copy link
Contributor Author

Thanks!

The internal function does not take care about replacing the original stdin back, right? So this current way seems simpler?

@IanButterworth
Copy link
Member

Seems good to me. Thanks!

@IanButterworth IanButterworth merged commit a23a4d9 into JuliaLang:master Mar 25, 2022
@barucden barucden deleted the mimic-stdin branch March 26, 2022 15:14
KristofferC pushed a commit that referenced this pull request May 24, 2022
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
(cherry picked from commit a23a4d9)
@KristofferC KristofferC mentioned this pull request May 24, 2022
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pkg tests try to punch into the internals of stdin

4 participants