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

Windows: open standard streams in binary mode #13397

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Apr 26, 2023

Fixes #13304.

This only affects Processes that are programs built by Crystal, including those from macro runs; Process.running a C application that prints \r\n without doing the same LibC._setmode call will still result in \r\r\n.

@straight-shoota
Copy link
Member

So this is basically the same topic as #11586 but for std streams?

@straight-shoota straight-shoota added this to the 1.9.0 milestone Apr 26, 2023
@HertzDevil
Copy link
Contributor Author

The original idea was just the console streams, but for Process.run to work with IO::Memory streams an IO.pipe must have been involved. So yes this is for standard streams in general

@mdwagner
Copy link
Contributor

I can confirm that this resolves my issue 🎉

@straight-shoota straight-shoota merged commit 3b14f80 into crystal-lang:master Apr 28, 2023
@HertzDevil HertzDevil deleted the bug/standard-stream-binary-mode branch April 28, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Heredoc adding additional '\r' before '\r\n' pair for newlines on Windows?
3 participants