Skip to content

erts: Only translate \r\n on character devices in fd ports - #11531

Open
garazdawi wants to merge 1 commit into
erlang:masterfrom
garazdawi:lukas/erts/fix-windows-crlf-translation
Open

erts: Only translate \r\n on character devices in fd ports#11531
garazdawi wants to merge 1 commit into
erlang:masterfrom
garazdawi:lukas/erts/fix-windows-crlf-translation

Conversation

@garazdawi

Copy link
Copy Markdown
Member

If the input handle is a pipe or something different we don't want to do any translation at all, but if it is a character device we translate \r\n to \n so that it mimics how terminals on Linux works a little bit better. As open_port fd is not used anymore for the normal erlang terminal this change only effects thirdparty usage which usually is from pipes that do not want any translation to happen.

Closes #10258

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    3 files    136 suites   52m 28s ⏱️
1 699 tests 1 641 ✅ 58 💤 0 ❌
2 342 runs  2 266 ✅ 76 💤 0 ❌

Results for commit 3a0e828.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

If the input handle is a pipe or something different we don't want to
do any translation at all, but if it is a character device we translate
\r\n to \n so that it mimics how terminals on Linux works a little bit
better. As open_port fd is not used anymore for the normal erlang terminal
this change only effects thirdparty usage which usually is from pipes
that do not want any translation to happen.

Closes erlang#10258
@garazdawi
garazdawi force-pushed the lukas/erts/fix-windows-crlf-translation branch from 03efcb5 to 3a0e828 Compare August 25, 2026 18:51
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.

[bug] binary stdin/stdout mode cannot be enabled on windows

1 participant