@@ -19,7 +19,8 @@ use crate::sys::process::process_common::*;
1919use crate :: { fmt, mem, sys} ;
2020
2121cfg_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" ) ) ] {
2324 use crate :: thread;
2425 use libc:: { c_char, posix_spawn_file_actions_t, posix_spawnattr_t} ;
2526 use 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 ) ) ) ]
194196 unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
195197 cvt ( 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" ) ) ]
203206 unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
204207 use 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" ) ]
541544 unsafe fn retrying_libc_posix_spawnp (
542545 pid : * mut pid_t ,
543546 file : * const c_char ,
0 commit comments