rust/src/test/ui/process
Dominik Stolz 12fbabd27f Do not call getpid wrapper after fork in tests
The test calls libc::getpid() in the pre_exec hook and asserts that the returned value is different from the PID of the parent.
However, libc::getpid() returns the wrong value.
Before version 2.25, glibc caches the PID of the current process with the goal of avoiding additional syscalls.
The cached value is only updated when the wrapper functions for fork or clone are called.
In PR #81825 we switch to directly using the clone3 syscall.
Thus, the cache is not updated and getpid returns the PID of the parent.
source: https://man7.org/linux/man-pages/man2/getpid.2.html#NOTES
2021-08-01 09:45:00 +02:00
..
process-envs.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-exit.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-panic-after-fork.rs Do not call getpid wrapper after fork in tests 2021-08-01 09:45:00 +02:00
process-remove-from-env.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-sigpipe.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-spawn-nonexistent.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-spawn-with-unicode-params.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
process-status-inherits-stdin.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
tls-exit-status.rs Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00