[PR #13309] Fix a deadlock in ShowWindow #29475

Closed
opened 2026-01-31 09:35:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/13309

State: closed
Merged: Yes


When we send this ShowWindow message, if we send it to it's
going to need to get processed by the window message thread before
returning. We're handling this message under lock. However, the first
thing the conhost message thread does is lock the console. That'll
deadlock us. So unlock here, first, to let the message thread deal with
this message, then re-lock so later on this thread can unlock again
safely.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13309 **State:** closed **Merged:** Yes --- When we send this ShowWindow message, if we send it to it's going to need to get processed by the window message thread before returning. We're handling this message under lock. However, the first thing the conhost message thread does is lock the console. That'll deadlock us. So unlock here, first, to let the message thread deal with this message, then re-lock so later on this thread can unlock again safely. * [x] Closes #13301 * [x] Tested conhost * [x] Tested terminal
claunia added the pull-request label 2026-01-31 09:35:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29475