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

High CPU consumption while waiting for user's input in WIN-ACCEPT #46

Closed
ikysil opened this issue Dec 16, 2018 · 2 comments
Closed

High CPU consumption while waiting for user's input in WIN-ACCEPT #46

ikysil opened this issue Dec 16, 2018 · 2 comments

Comments

@ikysil
Copy link
Owner

ikysil commented Dec 16, 2018

Root cause - call to ReadConsoleInput in WIN-CONSOLE-EKEY fails with

ERROR_INVALID_FUNCTION

1 (0x1)

Incorrect function.

Both Cygwin and Git-Bash (MSYS) consoles are affected.

Seems to be working fine in CMD or WSL console window.

@ruv
Copy link

ruv commented Dec 18, 2018

When a Windows console application is running under Cygwin terminal (mintty), it is running with stdio redirection to pipes, and a console window is not created. So, ReadConsoleInput returns error 0x6 ERROR_INVALID_HANDLE in such case.

It is useful if a Forth system is able to work with redirected stdio, regardless Cygwin terminals.

Regarding Bash shell. It can be started from mintty — and ReadConsoleInput will not work in child console applications; or from Windows console (e.g. regular instance of cmd.exe) — and ReadConsoleInput will work in child console applications.

@ikysil
Copy link
Owner Author

ikysil commented Mar 30, 2020

Repair for high CPU consumption has been confirmed using release v20.03-RC5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants