use PIDFD_GET_INFO ioctl when available#150412
Conversation
|
I'm not familiar with this area of code. r? libs |
|
No reviewers could be found from initial request |
|
Attempting to re-roll again r? libs |
There was a problem hiding this comment.
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.
|
@bors 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: rust-lang#82971
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
5eba1bb to
975fda9
Compare
|
Added additional @bors r=tgross35 |
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.
|
@bors try jobs=arm-android |
use PIDFD_GET_INFO ioctl when available try-job: arm-android
This comment has been minimized.
This comment has been minimized.
|
@bors r=tgross35 rollup=iffy |
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
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
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
…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
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
…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
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
|
We're seeing test failures, hitting the I think that means ioctl returned ENOTTY. This is with a Linux 6.8.0 kernel, which might be too old for this feature(?). But shouldn't the test handle that gracefully somehow? |
|
It's supposed to yeah but it's only checking for EINVAL and not ENOTTY, I'll submit a fix. |
also handle ENOTTY ioctl errors when checking pidfd -> pid support Otherwise the std testsuite fails on older kernels. Reported in rust-lang#150412 (comment)
also handle ENOTTY ioctl errors when checking pidfd -> pid support Otherwise the std testsuite fails on older kernels. Reported in rust-lang#150412 (comment)
Rollup merge of #151072 - fix-pidfd-ioctl, r=jhpratt also handle ENOTTY ioctl errors when checking pidfd -> pid support Otherwise the std testsuite fails on older kernels. Reported in #150412 (comment)
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