Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fixed issue #5109. Console stops echoing typed keys after running coreclr. - #2561

Merged
stephentoub merged 1 commit into
dotnet:masterfrom
mikem8361:fixtransport
Jan 8, 2016
Merged

stephentoub merged 1 commit into
dotnet:masterfrom
mikem8361:fixtransport

Conversation

@mikem8361

Copy link
Copy Markdown

The DbgTransportSession/TwoWayPipe code was closing handle 0 (stdout) because the DbgTransportSession class wasn't being zero init'ed via a memset. The TwoWayPipe code initialized the pipe handles to -1. The fix is to reinitialized the TwoWayPipe by calling the constructor. Even though it is overkill also checked for 0 in the Disconnect code that closes the pipes.

…ng a coreclr program.

The DbgTransportSession/TwoWayPipe code was closing handle 0 (stdout) because the DbgTransportSession class wasn't being zero init'ed via a memset. The TwoWayPipe code initialized the pipe handles to -1.  The fix is to reinitialized the TwoWayPipe by calling the constructor. Even though it is overkill also checked for 0 in the Disconnect code that closes the pipes.
@mikem8361 mikem8361 changed the title Fixed issue #5109. Console stops echoing typed keys after running a … Fixed issue #5109. Console stops echoing typed keys after running coreclr. Jan 7, 2016
@mikem8361

Copy link
Copy Markdown
Author

@stephentoub can you review?

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.

It seems a bit strange to have the constructor run, then zero them out, and then run the constructors again, but I don't know that there's anything technically wrong with it. Presumably no one could be using the lock or pipe as they were previously initialized before this point.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is definitely strange and I don’t like it either but I guess I don’t have time (right now) to do the right thing (properly initialize each field). I wish it was done properly when it was first written.

@stephentoub

Copy link
Copy Markdown
Member

Thanks for fixing. LGTM.

stephentoub added a commit that referenced this pull request Jan 8, 2016
Fixed issue #5109.  Console stops echoing typed keys after running coreclr.
@stephentoub
stephentoub merged commit 1e5934c into dotnet:master Jan 8, 2016
@mikem8361
mikem8361 deleted the fixtransport branch January 8, 2016 02:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants