summary refs log tree commit diff
path: root/src/test/ui/command/command-pre-exec.rs
AgeCommit message (Collapse)AuthorLines
2021-08-01Do not call getpid wrapper after fork in testsDominik Stolz-6/+19
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-05-27Test THIR unsafeck for unsafe ops in closuresLeSeulArtichaut-0/+2
2021-03-09Do not attempt to unlock envlock in child process after a fork.The8472-14/+0
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.
2020-11-22Drop support for cloudabi targetsLzu Tao-1/+0
2019-12-16Move command-related tests into command/Jeremy Fitzhardinge-0/+118