diff options
| author | The8472 <git@infinite-source.de> | 2021-03-09 21:42:38 +0100 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2021-03-09 22:14:07 +0100 |
| commit | d854789ce191be25f2953c60fd50ce711776d9eb (patch) | |
| tree | b42897c0145876ef1cc7d82740a0b0a3dd8962dc /src/test/ui/command | |
| parent | 3a5d45f68cadc8fff4fbb557780f92b403b19c19 (diff) | |
| download | rust-d854789ce191be25f2953c60fd50ce711776d9eb.tar.gz rust-d854789ce191be25f2953c60fd50ce711776d9eb.zip | |
Do not attempt to unlock envlock in child process after a fork.
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.
Diffstat (limited to 'src/test/ui/command')
| -rw-r--r-- | src/test/ui/command/command-pre-exec.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/command/command-pre-exec.rs b/src/test/ui/command/command-pre-exec.rs index 8fc6a220331..819ed0b2dde 100644 --- a/src/test/ui/command/command-pre-exec.rs +++ b/src/test/ui/command/command-pre-exec.rs @@ -45,20 +45,6 @@ fn main() { let output = unsafe { Command::new(&me) - .arg("test2") - .pre_exec(|| { - env::set_var("FOO", "BAR"); - Ok(()) - }) - .output() - .unwrap() - }; - assert!(output.status.success()); - assert!(output.stderr.is_empty()); - assert!(output.stdout.is_empty()); - - let output = unsafe { - Command::new(&me) .arg("test3") .pre_exec(|| { env::set_current_dir("/").unwrap(); |
