diff options
| author | bors <bors@rust-lang.org> | 2024-06-22 03:35:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-22 03:35:52 +0000 |
| commit | 10e1f5d2121831991a1bebb8cda044a1677aaddf (patch) | |
| tree | 176cda1d666d59c739236e2a4fad6eebf59813ff /compiler/rustc_codegen_llvm/src | |
| parent | fcae62649e66b86eaf742414d8fc9c05d58e0a7e (diff) | |
| parent | 8abf149bde08d8f1fc50517bbe4d50368740d054 (diff) | |
| download | rust-10e1f5d2121831991a1bebb8cda044a1677aaddf.tar.gz rust-10e1f5d2121831991a1bebb8cda044a1677aaddf.zip | |
Auto merge of #124101 - the8472:pidfd-methods, r=cuviper
Add PidFd::{kill, wait, try_wait}
#117957 changed `Child` kill/wait/try_wait to use its pidfd instead of the pid, when one is available.
This PR extracts those implementations and makes them available on `PidFd` directly.
The `PidFd` implementations differ significantly from the corresponding `Child` methods:
* the methods can be called after the child has been reaped, which will result in an error but will be safe. This state is not observable in `Child` unless something stole the zombie child
* the `ExitStatus` is not kept, meaning that only the first time a wait succeeds it will be returned
* `wait` does not close stdin
* `wait` only requires `&self` instead of `&mut self` since there is no state to maintain and subsequent calls are safe
Tracking issue: #82971
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
