Skip to content

fix(core): make Unix pipe fd ownership explicit - #36353

Merged
nathanwhit merged 2 commits into
denoland:mainfrom
nathanwhit:fix/unix-pipe-fd-ownership
Aug 21, 2026
Merged

nathanwhit merged 2 commits into
denoland:mainfrom
nathanwhit:fix/unix-pipe-fd-ownership

Conversation

@nathanwhit

@nathanwhit nathanwhit commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • keep raw Unix pipe descriptors owned by the pipe handle until ownership is transferred
  • make Tokio streams and listeners the sole closer after connect, accept, or listen
  • retain explicit cleanup for descriptor-only pipes and non-owning AsyncFd registrations
  • cover raw, listener, accepted-stream, and bound-connect ownership transitions

Tests

  • ./tools/format.js
  • cargo test -p deno_core 'uv_compat::tests' --lib
  • cargo clippy -p deno_core --lib --tests --no-deps -- -D warnings
  • cargo build -p deno --bin deno

@nathanwhit
nathanwhit merged commit cc6dd5e into denoland:main Aug 21, 2026
269 of 271 checks passed
@nathanwhit
nathanwhit deleted the fix/unix-pipe-fd-ownership branch August 21, 2026 18:45
bartlomieju pushed a commit that referenced this pull request Aug 27, 2026
## Summary

- keep raw Unix pipe descriptors owned by the pipe handle until
ownership is transferred
- make Tokio streams and listeners the sole closer after connect,
accept, or listen
- retain explicit cleanup for descriptor-only pipes and non-owning
`AsyncFd` registrations
- cover raw, listener, accepted-stream, and bound-connect ownership
transitions

## Tests

- `./tools/format.js`
- `cargo test -p deno_core 'uv_compat::tests' --lib`
- `cargo clippy -p deno_core --lib --tests --no-deps -- -D warnings`
- `cargo build -p deno --bin deno`
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.

1 participant