Skip to content

Conversation

@garazdawi
Copy link
Contributor

When calling ReadFile using blocking semantics on a terminal, the call would block until a line has been entered on the console. This makes it impossible
to interact with the process doing the read (to change encoding for example).

So we change to using non-blocking (OVERLAPPED) ReadFile when reading from a Console when there is no shell started.

Fixes #7261

@github-actions
Copy link
Contributor

github-actions bot commented Jun 14, 2023

CT Test Results

       3 files     183 suites   1h 51m 55s ⏱️
2 898 tests 2 617 ✔️ 279 💤 2
3 506 runs  3 160 ✔️ 344 💤 2

For more details on these failures, see this check.

Results for commit 9a0635c.

♻️ 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

@garazdawi garazdawi added the testing currently being tested, tag is used by OTP internal CI label Jun 16, 2023
@garazdawi garazdawi force-pushed the lukas/erts/fix-blocking-ReadFile-win32 branch from 1c6eaec to 9a0635c Compare June 19, 2023 12:59
When calling ReadFile using blocking semantics on a
terminal, the call would block until a line has been
entered on the console. This makes it impossible
to interact with the process doing the read (to change
encoding for example).

So we change to using non-blocking (OVERLAPPED) ReadFile
when reading from a Console when there is no shell started.

Fixes erlang#7261
@garazdawi garazdawi force-pushed the lukas/erts/fix-blocking-ReadFile-win32 branch from 9a0635c to 2bbeed3 Compare June 20, 2023 08:17
@garazdawi garazdawi merged commit f112796 into erlang:master Jun 20, 2023
@garazdawi garazdawi added this to the OTP-26.0.2 milestone Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erlang/OTP 26 hangs when stdio is set utf-8 encoding without a terminal on Windows

1 participant