| Age | Commit message (Collapse) | Author | Lines |
|
This reverts commit 12fbabd27f700a59d0e7031f0839b220c3514bcb.
It was only needed because of using raw `clone3` instead of `fork`, but
we only do that now when a pidfd is requested.
|
|
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
|
|
|
|
This is a breaking change for cases where the environment is
accessed in a Command::pre_exec closure. Except for
single-threaded programs these uses were not correct
anyway since they aren't async-signal safe.
|
|
|
|
|