File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/libstd/sys/vxworks/process Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ impl Command {
1515 -> io:: Result < ( Process , StdioPipes ) > {
1616 use crate :: sys:: { cvt_r} ;
1717 const CLOEXEC_MSG_FOOTER : & ' static [ u8 ] = b"NOEX" ;
18+ let envp = self . capture_env ( ) ;
1819
1920 if self . saw_nul ( ) {
2021 return Err ( io:: Error :: new ( ErrorKind :: InvalidInput ,
@@ -52,10 +53,13 @@ impl Command {
5253 t ! ( cvt( libc:: chdir( cwd. as_ptr( ) ) ) ) ;
5354 }
5455
56+ let c_envp = envp. as_ref ( ) . map ( |c| c. as_ptr ( ) )
57+ . unwrap_or_else ( || * sys:: os:: environ ( ) as * const _ ) ;
58+
5559 let ret = libc:: rtpSpawn (
5660 self . get_argv ( ) [ 0 ] , // executing program
5761 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 ,
5963 100 as c_int , // initial priority
6064 thread:: min_stack ( ) , // initial stack size.
6165 0 , // options
You can’t perform that action at this time.
0 commit comments