Skip to content

fix: close Chromium pipe fds when launch is cancelled - #33

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/pipe-fd-drop-b6e1
Oct 16, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/pipe-fd-drop-b6e1

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

What

ChromiumPipeFds now closes every pipe end it still owns when it is dropped. Launch cancellation, spawn failure, and the child ends left after into_parent_files all go through that Drop. Parent ends transferred into File are set to -1 first so they are not closed twice.

Why

Cancelling a Unix pipe-transport launch returned before into_parent_files, and ChromiumPipeFds had no Drop. Those four descriptors leaked. Repeating cancel-and-retry could exhaust the process file-descriptor limit.

Testing

  • cargo test --locked --lib chromium_pipe_fds -- --test-threads=1 (2 passed)
  • cargo check --locked
  • Targeted pytest, using the focused -k subset from CONTRIBUTING.md

Checklist

  • I kept this change focused.
  • I added or updated tests for behavior changes.
  • I did not include private credentials, tokens, or internal-only artifacts.
Open in Web Open in Cursor 

Drop for ChromiumPipeFds closes every end still owned, including the
cancellation path that previously returned without close_all. Parent
ends transferred into File are disarmed first so they are not closed twice.

Co-authored-by: Jared Lunde <jared.lunde@gmail.com>
@cursor
cursor Bot merged commit 7e95ccd into main Oct 16, 2026
3 checks passed
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.

2 participants