File tree 1 file changed +5
-1
lines changed
src/libstd/sys/vxworks/process
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ impl Command {
15
15
-> io:: Result < ( Process , StdioPipes ) > {
16
16
use crate :: sys:: { cvt_r} ;
17
17
const CLOEXEC_MSG_FOOTER : & ' static [ u8 ] = b"NOEX" ;
18
+ let envp = self . capture_env ( ) ;
18
19
19
20
if self . saw_nul ( ) {
20
21
return Err ( io:: Error :: new ( ErrorKind :: InvalidInput ,
@@ -52,10 +53,13 @@ impl Command {
52
53
t ! ( cvt( libc:: chdir( cwd. as_ptr( ) ) ) ) ;
53
54
}
54
55
56
+ let c_envp = envp. as_ref ( ) . map ( |c| c. as_ptr ( ) )
57
+ . unwrap_or_else ( || * sys:: os:: environ ( ) as * const _ ) ;
58
+
55
59
let ret = libc:: rtpSpawn (
56
60
self . get_argv ( ) [ 0 ] , // executing program
57
61
self . get_argv ( ) . as_ptr ( ) as * mut * const c_char , // argv
58
- * sys :: os :: environ ( ) as * mut * const c_char ,
62
+ c_envp as * mut * const c_char ,
59
63
100 as c_int , // initial priority
60
64
thread:: min_stack ( ) , // initial stack size.
61
65
0 , // options
You can’t perform that action at this time.
0 commit comments