Skip to content

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Oct 14, 2025

Fixes #147624

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer


// SAFETY: Dropping `stdio` (ChildPipes) is safe here since ChildPipes
// does not involve heap memory allocations
debug_assert!(size_of::<ChildPipes>() <= 24);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the intension is make sure ChildPipes does not involve heap allocations,
mem::needs_drop does not work here, since ChildPipes -> ChildStdio -> FileDesc,
and FileDesc impl Drop.

any better way to achieve the assertion?

@joboet
Copy link
Member

joboet commented Oct 14, 2025

See #147624 (comment) for why I don't think this is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File descriptors passed to Command::stdout/err/in are not closed after dup2

4 participants