Auto merge of #127897 - nyurik:add-qnx-70-target, r=saethlin · patricklam/verify-rust-std@065844b
@@ -19,7 +19,8 @@ use crate::sys::process::process_common::*;
1919use crate::{fmt, mem, sys};
20202121cfg_if::cfg_if! {
22-if #[cfg(all(target_os = "nto", target_env = "nto71"))] {
22+// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
23+if #[cfg(any(target_env = "nto70", target_env = "nto71"))] {
2324use crate::thread;
2425use libc::{c_char, posix_spawn_file_actions_t, posix_spawnattr_t};
2526use crate::time::Duration;
@@ -189,7 +190,8 @@ impl Command {
189190#[cfg(not(any(
190191 target_os = "watchos",
191192 target_os = "tvos",
192- all(target_os = "nto", target_env = "nto71"),
193+ target_env = "nto70",
194+ target_env = "nto71"
193195 )))]
194196unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
195197cvt(libc::fork())
@@ -199,7 +201,8 @@ impl Command {
199201// or closed a file descriptor while the fork() was occurring".
200202// Documentation says "... or try calling fork() again". This is what we do here.
201203// See also https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/f/fork.html
202-#[cfg(all(target_os = "nto", target_env = "nto71"))]
204+// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
205+#[cfg(any(target_env = "nto70", target_env = "nto71"))]
203206unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
204207use crate::sys::os::errno;
205208@@ -537,7 +540,7 @@ impl Command {
537540// or closed a file descriptor while the posix_spawn() was occurring".
538541// Documentation says "... or try calling posix_spawn() again". This is what we do here.
539542// See also http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/p/posix_spawn.html
540-#[cfg(all(target_os = "nto", target_env = "nto71"))]
543+#[cfg(target_os = "nto")]
541544unsafe fn retrying_libc_posix_spawnp(
542545pid: *mut pid_t,
543546file: *const c_char,