@@ -19,8 +19,7 @@ use crate::sys::process::process_common::*;
19
19
use crate :: { fmt, mem, sys} ;
20
20
21
21
cfg_if:: cfg_if! {
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" , target_env = "nto71_iosock" ) ) ] {
22
+ if #[ cfg( target_os = "nto" ) ] {
24
23
use crate :: thread;
25
24
use libc:: { c_char, posix_spawn_file_actions_t, posix_spawnattr_t} ;
26
25
use crate :: time:: Duration ;
@@ -187,13 +186,7 @@ impl Command {
187
186
188
187
// Attempts to fork the process. If successful, returns Ok((0, -1))
189
188
// in the child, and Ok((child_pid, -1)) in the parent.
190
- #[ cfg( not( any(
191
- target_os = "watchos" ,
192
- target_os = "tvos" ,
193
- target_env = "nto70" ,
194
- target_env = "nto71" ,
195
- target_env = "nto71_iosock" ,
196
- ) ) ) ]
189
+ #[ cfg( not( any( target_os = "watchos" , target_os = "tvos" , target_os = "nto" ) ) ) ]
197
190
unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
198
191
cvt ( libc:: fork ( ) )
199
192
}
@@ -202,8 +195,7 @@ impl Command {
202
195
// or closed a file descriptor while the fork() was occurring".
203
196
// Documentation says "... or try calling fork() again". This is what we do here.
204
197
// See also https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/f/fork.html
205
- // This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
206
- #[ cfg( any( target_env = "nto70" , target_env = "nto71" , target_env = "nto71_iosock" ) ) ]
198
+ #[ cfg( target_os = "nto" ) ]
207
199
unsafe fn do_fork ( & mut self ) -> Result < pid_t , io:: Error > {
208
200
use crate :: sys:: os:: errno;
209
201
0 commit comments