Skip to content

Only honor Ctrl+Z during ReadFile if the console is in PROCESSED mode#19940

Merged
DHowett merged 2 commits into
mainfrom
dev/duhowett/readfile
Mar 11, 2026
Merged

Only honor Ctrl+Z during ReadFile if the console is in PROCESSED mode#19940
DHowett merged 2 commits into
mainfrom
dev/duhowett/readfile

Conversation

@DHowett

@DHowett DHowett commented Mar 5, 2026

Copy link
Copy Markdown
Member

This restores the behavior of ReadFile to that of Windows 7.

Closes #4958

This restores the behavior of ReadFile to that of Windows 7.

Closes #4958
@DHowett

DHowett commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

Perhaps of interest to @tig and @eryksun

// the behavior from Windows 7 (see filehops.c:123) we need to honor
// ^Z only if PROCESSED_INPUT is enabled.
ULONG InputMode{ 0 };
m->_pApiRoutines->GetConsoleInputModeImpl(*pInputBuffer, InputMode);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably has a [[nodiscard]] hanging out on it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sike, it returns void

@microsoft-github-policy-service microsoft-github-policy-service Bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Priority-2 A description (P2) Product-Conhost For issues in the Console codebase Impact-Compatibility Sure don't work like it used to. labels Mar 5, 2026
Comment thread src/server/ApiDispatchers.cpp Fixed
@github-actions

This comment has been minimized.

@carlos-zamora carlos-zamora left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. I took a look at your messages in #4958. Looks well thought out and complete!

ship it

@DHowett DHowett merged commit 80e4b3c into main Mar 11, 2026
20 checks passed
@DHowett DHowett deleted the dev/duhowett/readfile branch March 11, 2026 16:52
@github-project-automation github-project-automation Bot moved this to To Cherry Pick in 1.25 Servicing Pipeline Apr 3, 2026
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.25 Servicing Pipeline Apr 3, 2026
DHowett added a commit that referenced this pull request Apr 3, 2026
…#19940)

This restores the behavior of ReadFile to that of Windows 7.

Closes #4958

(cherry picked from commit 80e4b3c)
Service-Card-Id: PVTI_lADOAF3p4s4BQX0-zgpBM28
Service-Version: 1.25
@DHowett DHowett moved this from Cherry Picked to Shipped in 1.25 Servicing Pipeline Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Impact-Compatibility Sure don't work like it used to. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Conhost For issues in the Console codebase

Projects

Development

Successfully merging this pull request may close these issues.

ReadFile: Ctrl+Z sends EOF even if console is in 'raw' mode

4 participants