Skip to content

Conversation

@the8472
Copy link
Member

@the8472 the8472 commented Dec 26, 2025

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: #82971

@the8472 the8472 added the O-linux Operating system: Linux label Dec 26, 2025
@rustbot rustbot added O-unix Operating system: Unix-like 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 Dec 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 26, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
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

@jhpratt
Copy link
Member

jhpratt commented Dec 31, 2025

I'm not familiar with this area of code.

r? libs

@rustbot
Copy link
Collaborator

rustbot commented Dec 31, 2025

No reviewers could be found from initial request libs
This repo may be misconfigured.
Use r? to specify someone else to assign.

@jhpratt
Copy link
Member

jhpratt commented Jan 4, 2026

Attempting to re-roll again

r? libs

@rustbot rustbot assigned tgross35 and unassigned jhpratt Jan 4, 2026
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Two small suggestions but LGTM.

Cc @cuviper if you'd like to take a second look, since I assume you're more up on the latest pidfd developments than I am.

View changes since this review

@the8472
Copy link
Member Author

the8472 commented Jan 5, 2026

@bors r=tgross35

@bors
Copy link
Collaborator

bors commented Jan 5, 2026

📌 Commit bf2308f has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 5, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 5, 2026
use PIDFD_GET_INFO ioctl when available

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: rust-lang#82971
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2026
use PIDFD_GET_INFO ioctl when available

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: rust-lang#82971
bors added a commit that referenced this pull request Jan 5, 2026
Rollup of 3 pull requests

Successful merges:

 - #150412 (use PIDFD_GET_INFO ioctl when available)
 - #150668 (Unix implementation for stdio set/take/replace)
 - #150702 (`rust-analyzer` subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-

#150716 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 5, 2026
@the8472 the8472 force-pushed the pidfd-spawn branch 2 times, most recently from 5eba1bb to 975fda9 Compare January 6, 2026 00:05
@the8472
Copy link
Member Author

the8472 commented Jan 6, 2026

Added additional cfgs. Locally it passes x check for ohos and android.

@bors r=tgross35

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

📌 Commit 975fda9 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 6, 2026
@the8472
Copy link
Member Author

the8472 commented Jan 6, 2026

ah no, tier2 doesn't run tests

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 6, 2026
This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case
where the child is spawned but we can't get the pid.
And `pidfd.{try_}wait` will be able to return the exit status even after a process has been reaped.
At least on newer kernels.
@the8472
Copy link
Member Author

the8472 commented Jan 6, 2026

@bors try jobs=arm-android

rust-bors bot added a commit that referenced this pull request Jan 6, 2026
use PIDFD_GET_INFO ioctl when available

try-job: arm-android
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 6, 2026

☀️ Try build successful (CI)
Build commit: db2c05c (db2c05c00f9ce5afe201427e41827cc903758986, parent: 4fa80a5e733e2202d7ca4c203c2fdfda41cfe7dc)

@the8472
Copy link
Member Author

the8472 commented Jan 6, 2026

@bors r=tgross35 rollup=iffy

@bors
Copy link
Collaborator

bors commented Jan 6, 2026

📌 Commit fa4a62b has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 6, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 6, 2026
use PIDFD_GET_INFO ioctl when available

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: rust-lang#82971
bors added a commit that referenced this pull request Jan 6, 2026
Rollup of 8 pull requests

Successful merges:

 - #144113 (Impls and impl items inherit `dead_code` lint level of the corresponding traits and trait items)
 - #149880 (rustc_codegen_llvm: update alignment for double on AIX)
 - #150412 (use PIDFD_GET_INFO ioctl when available)
 - #150668 (Unix implementation for stdio set/take/replace)
 - #150670 (THIR pattern building: Move all `thir::Pat` creation into `rustc_mir_build::thir::pattern`)
 - #150695 (MGCA: pretty printing for struct expressions and tuple calls )
 - #150698 (Improve comment clarity in candidate_may_shadow)
 - #150706 (Update wasm-component-ld)

r? `@ghost`
`@rustbot` modify labels: rollup
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 6, 2026
use PIDFD_GET_INFO ioctl when available

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: rust-lang#82971
bors added a commit that referenced this pull request Jan 6, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #144113 (Impls and impl items inherit `dead_code` lint level of the corresponding traits and trait items)
 - #148339 (naked functions: emit `.private_extern` on macos)
 - #149880 (rustc_codegen_llvm: update alignment for double on AIX)
 - #150122 (Refactor function names of `rustc_ast_lowering`)
 - #150412 (use PIDFD_GET_INFO ioctl when available)
 - #150670 (THIR pattern building: Move all `thir::Pat` creation into `rustc_mir_build::thir::pattern`)
 - #150695 (MGCA: pretty printing for struct expressions and tuple calls )
 - #150698 (Improve comment clarity in candidate_may_shadow)
 - #150706 (Update wasm-component-ld)
 - #150707 (Fix ICE when transmute Assume field is invalid)
 - #150708 (Enable merge queue in new bors)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jan 6, 2026
Rollup of 11 pull requests

Successful merges:

 - #144113 (Impls and impl items inherit `dead_code` lint level of the corresponding traits and trait items)
 - #148339 (naked functions: emit `.private_extern` on macos)
 - #149880 (rustc_codegen_llvm: update alignment for double on AIX)
 - #150122 (Refactor function names of `rustc_ast_lowering`)
 - #150412 (use PIDFD_GET_INFO ioctl when available)
 - #150670 (THIR pattern building: Move all `thir::Pat` creation into `rustc_mir_build::thir::pattern`)
 - #150695 (MGCA: pretty printing for struct expressions and tuple calls )
 - #150698 (Improve comment clarity in candidate_may_shadow)
 - #150706 (Update wasm-component-ld)
 - #150707 (Fix ICE when transmute Assume field is invalid)
 - #150708 (Enable merge queue in new bors)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jan 6, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #144113 (Impls and impl items inherit `dead_code` lint level of the corresponding traits and trait items)
 - #149880 (rustc_codegen_llvm: update alignment for double on AIX)
 - #150122 (Refactor function names of `rustc_ast_lowering`)
 - #150412 (use PIDFD_GET_INFO ioctl when available)
 - #150670 (THIR pattern building: Move all `thir::Pat` creation into `rustc_mir_build::thir::pattern`)
 - #150695 (MGCA: pretty printing for struct expressions and tuple calls )
 - #150698 (Improve comment clarity in candidate_may_shadow)
 - #150706 (Update wasm-component-ld)
 - #150707 (Fix ICE when transmute Assume field is invalid)
 - #150708 (Enable merge queue in new bors)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3b0d35f into rust-lang:main Jan 6, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 6, 2026
rust-timer added a commit that referenced this pull request Jan 6, 2026
Rollup merge of #150412 - the8472:pidfd-spawn, r=tgross35

use PIDFD_GET_INFO ioctl when available

This way using pidfd_spawnp won't have to rely on procfs, avoiding an unpleasant edge-case where the child is spawned but we can't get the pid. And pidfd.{try_}wait will be able to return the exit status even after a process has been reaped. At least on newer kernels.

Tracking issue: #82971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-linux Operating system: Linux O-unix Operating system: Unix-like S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants