[PR #3461] Replace ConhostConnection with ConptyConnection #25375

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

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

State: closed
Merged: Yes


This commit deletes ConhostConnection and replaces it with
ConptyConnection. The ConptyConnection uses CreatePseudoConsole and
depends on winconpty to override the one from kernel32.

  • winconpty must be packageable, so I've added GetPackagingOutputs.
    • To validate this, I added conpty.dll to the MSIX regression script.
  • I moved the code from conpty-universal that deals with environment
    strings into the types library.

This puts us in a way better place to implement #2563, as we can now
separately detect a failure to launch a pseudoconsole, a failure to
CreateProcess, and a failure of the launched process.

Fixes #1131.

References

Relevant to #2563.

PR Checklist

  • Closes Missing Files (#1131)
  • CLA
  • Tests added/passed
  • Requires documentation to be updated
  • It is a core contributor.

Validation Steps Performed

Launched WT a bunch, with shells and pseudoterminal hosts that didn't exist, and killed various processes all over the tree.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/3461 **State:** closed **Merged:** Yes --- This commit deletes ConhostConnection and replaces it with ConptyConnection. The ConptyConnection uses CreatePseudoConsole and depends on winconpty to override the one from kernel32. * winconpty must be packageable, so I've added GetPackagingOutputs. * To validate this, I added conpty.dll to the MSIX regression script. * I moved the code from conpty-universal that deals with environment strings into the types library. This puts us in a way better place to implement #2563, as we can now separately detect a failure to launch a pseudoconsole, a failure to CreateProcess, and a failure of the launched process. Fixes #1131. ## References Relevant to #2563. ## PR Checklist * [x] Closes #1131 * [x] CLA * [x] Tests added/passed * [ ] Requires documentation to be updated * [x] It is a core contributor. ## Validation Steps Performed Launched WT a bunch, with shells and pseudoterminal hosts that didn't exist, and killed various processes all over the tree.
claunia added the pull-request label 2026-01-31 09:09: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#25375