Skip to content

fix: close leaked process and pipe handles on Windows PTY sessions - #49

Merged
taciturnaxolotl merged 1 commit into
masterfrom
fix/conpty-handle-leak
Jul 30, 2026
Merged

fix: close leaked process and pipe handles on Windows PTY sessions#49
taciturnaxolotl merged 1 commit into
masterfrom
fix/conpty-handle-leak

Conversation

@taciturnaxolotl

Copy link
Copy Markdown
Member

Each PTY session on Windows leaked roughly one handle because the raw
process handle returned by ConPty.Spawn was never closed. Upgrade
charmbracelet/x/conpty to v0.2.0 which closes all four pipe handles
properly, and close the spawned process handle once the process exits
or the session context is cancelled.

fixes #20

@taciturnaxolotl
taciturnaxolotl force-pushed the fix/conpty-handle-leak branch from e0f83ed to a0b63fe Compare July 30, 2026 00:21
Each PTY session on Windows leaked roughly one handle because the raw
process handle returned by ConPty.Spawn was never closed. Upgrade
charmbracelet/x/conpty to v0.2.0 which closes all four pipe handles
properly, and close the spawned process handle once the process exits
or the session context is cancelled.
@taciturnaxolotl
taciturnaxolotl force-pushed the fix/conpty-handle-leak branch from a0b63fe to eb5d22b Compare July 30, 2026 00:42
@taciturnaxolotl
taciturnaxolotl merged commit eb5d22b into master Jul 30, 2026
10 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 30503519225

Coverage remained the same at 62.359%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1238
Covered Lines: 772
Line Coverage: 62.36%
Coverage Strength: 6669.61 hits per line

💛 - Coveralls

@taciturnaxolotl
taciturnaxolotl deleted the fix/conpty-handle-leak branch July 30, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conpty handle leak

2 participants