rust/library/std/src
Matthias Krüger f9b3e8b387
Rollup merge of #126827 - the8472:pidfd-spawn, r=workingjubilee
Use pidfd_spawn for faster process spawning when a PidFd is requested

glibc 2.39 added `pidfd_spawnp` and `pidfd_getpid` which makes it possible to get pidfds while staying on the CLONE_VFORK path.

verified that vfork gets used with strace:

```
$  strace -ff -e pidfd_open,clone3,openat,execve,waitid,close ./x test std --no-doc -- pidfd
[...]
[pid 2820532] clone3({flags=CLONE_VM|CLONE_PIDFD|CLONE_VFORK|CLONE_CLEAR_SIGHAND, pidfd=0x7b7f885fec6c, exit_signal=SIGCHLD, stack=0x7b7f88aff000, stack_size=0x9000}strace: Process 2820533 attached
 <unfinished ...>
[pid 2820533] execve("/home/the8472/bin/sleep", ["sleep", "1000"], 0x7ffdd0e268d8 /* 107 vars */) = -1 ENOENT (No such file or directory)
[pid 2820533] execve("/home/the8472/.cargo/bin/sleep", ["sleep", "1000"], 0x7ffdd0e268d8 /* 107 vars */) = -1 ENOENT (No such file or directory)
[pid 2820533] execve("/usr/local/bin/sleep", ["sleep", "1000"], 0x7ffdd0e268d8 /* 107 vars */) = -1 ENOENT (No such file or directory)
[pid 2820533] execve("/usr/bin/sleep", ["sleep", "1000"], 0x7ffdd0e268d8 /* 107 vars */ <unfinished ...>
[pid 2820532] <... clone3 resumed> => {pidfd=[3]}, 88) = 2820533
[pid 2820533] <... execve resumed>)     = 0
[pid 2820532] openat(AT_FDCWD, "/proc/self/fdinfo/3", O_RDONLY|O_CLOEXEC) = 4
[pid 2820532] close(4)                  = 0
```

Tracking issue: #82971
2024-07-12 14:37:58 +02:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Fix typo in the docs of HashMap::raw_entry_mut 2024-06-03 17:35:58 +01:00
env remove redundant imports 2023-12-10 10:56:22 +08:00
error core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
f16 Add tests for f16 and f128 2024-06-25 01:32:36 -04:00
f32 Extract repeated constants from f32 and f64 source 2024-06-24 00:42:21 -05:00
f64 Extract repeated constants from f32 and f64 source 2024-06-24 00:42:21 -05:00
f128 Add tests for f16 and f128 2024-06-25 01:32:36 -04:00
ffi PathBuf::as_mut_vec removed and verified for UEFI and Windows platforms #126333 2024-06-25 07:36:34 -06:00
fs Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
hash Add blank lines after module-level //! comments. 2024-06-20 09:23:20 +10:00
io chore: remove duplicate words 2024-07-02 11:25:31 +08:00
net Replace MaybeUninit::uninit_array() with array repeat expression. 2024-06-24 10:23:50 -07:00
num removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
os Fixed doc links 2024-07-09 22:09:13 -04:00
panic
path Rollup merge of #127297 - the8472:path-new-hash, r=Nilstrieb 2024-07-07 14:22:00 +02:00
prelude replace version placeholder 2024-06-11 16:52:02 +02:00
process Don't mark DEBUG_EVENT struct as repr(packed) 2024-07-10 15:47:24 +02:00
sync Rename lazy_cell_consume to lazy_cell_into_inner 2024-07-11 03:16:45 -04:00
sys Rollup merge of #126827 - the8472:pidfd-spawn, r=workingjubilee 2024-07-12 14:37:58 +02:00
sys_common std: test a variety of ways to extend a Wtf8Buf 2024-06-25 23:44:49 -07:00
thread Replace move|| with move || in compiler/ and library/ 2024-06-18 23:25:08 +08:00
time Rollup merge of #103056 - beetrees:timespec-bug-fix, r=thomcc 2023-05-05 18:40:32 +05:30
alloc.rs Unify guarantees about the default allocator 2024-06-11 17:13:26 +02:00
ascii.rs Add the basic ascii::Char type 2023-05-03 22:09:33 -07:00
backtrace.rs std: move sys_common::backtrace to sys 2024-06-16 13:14:01 +02:00
env.rs Auto merge of #126273 - pietroalbini:pa-bootstrap-update, r=Mark-Simulacrum 2024-06-12 18:15:32 +00:00
error.rs std: move sys_common::backtrace to sys 2024-06-16 13:14:01 +02:00
f16.rs Add more f16 and f128 library functions and constants 2024-06-25 01:32:36 -04:00
f32.rs variable-precision float operations behave non-deterministically 2024-05-02 18:57:30 +02:00
f64.rs variable-precision float operations behave non-deterministically 2024-05-02 18:57:30 +02:00
f128.rs Add more f16 and f128 library functions and constants 2024-06-25 01:32:36 -04:00
fs.rs Rollup merge of #126140 - eduardosm:stabilize-fs_try_exists, r=Amanieu 2024-06-22 19:33:55 +02:00
keyword_docs.rs Mention labelled blocks in break docs 2024-03-15 10:51:57 -07:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #126792 - wooden-worm:master, r=Mark-Simulacrum 2024-07-04 04:09:49 -04:00
macros.rs Add tests for f16 and f128 2024-06-25 01:32:36 -04:00
num.rs Replace version placeholders for 1.79 2024-05-01 21:01:51 -04:00
panic.rs Use payload_as_str instead of two downcasts. 2024-06-12 13:15:29 +02:00
panicking.rs Add PanicMessage type for PanicInfo::message(). 2024-06-17 20:44:55 +02:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
path.rs Rollup merge of #127297 - the8472:path-new-hash, r=Nilstrieb 2024-07-07 14:22:00 +02:00
process.rs Clarify Command::new behavior if passed programs with arguments 2024-06-10 12:25:05 +00:00
rt.rs std: move sys_common::backtrace to sys 2024-06-16 13:14:01 +02:00
time.rs Rust is a proper name: rust → Rust 2024-03-07 07:49:22 +01:00