@@ -19,7 +19,8 @@ use crate::sys::process::process_common::*;
19
19
use crate :: { fmt, mem, sys} ;
20
20
21
21
cfg_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" ) ) ] {
23
24
use crate :: thread;
24
25
use libc:: { c_char, posix_spawn_file_actions_t, posix_spawnattr_t} ;
25
26
use crate :: time:: Duration ;
@@ -189,7 +190,8 @@ impl Command {
189
190
#[ cfg( not( any(
190
191
target_os = "watchos" ,
191
192
target_os = "tvos" ,
192
- all( target_os = "nto" , target_env = "nto71" ) ,
193
+ target_env = "nto70" ,
194
+ target_env = "nto71"
193
195
) ) ) ]
194
196
unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
195
197
cvt ( libc:: fork ( ) )
@@ -199,7 +201,8 @@ impl Command {
199
201
// or closed a file descriptor while the fork() was occurring".
200
202
// Documentation says "... or try calling fork() again". This is what we do here.
201
203
// 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" ) ) ]
203
206
unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
204
207
use crate :: sys:: os:: errno;
205
208
@@ -537,7 +540,7 @@ impl Command {
537
540
// or closed a file descriptor while the posix_spawn() was occurring".
538
541
// Documentation says "... or try calling posix_spawn() again". This is what we do here.
539
542
// 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" ) ]
541
544
unsafe fn retrying_libc_posix_spawnp (
542
545
pid : * mut pid_t ,
543
546
file : * const c_char ,
0 commit comments