Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
CDirkx committed Apr 21, 2021
1 parent 9bd9cbb commit aa46f08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/process/process_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl Command {
pub fn get_groups(&self) -> Option<&[gid_t]> {
self.groups.as_deref()
}
#[allow(dead_code)]

pub fn get_closures(&mut self) -> &mut Vec<Box<dyn FnMut() -> io::Result<()> + Send + Sync>> {
&mut self.closures
}
Expand Down
4 changes: 3 additions & 1 deletion library/std/src/sys/unix/process/process_vxworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ impl Command {
needs_stdin: bool,
) -> io::Result<(Process, StdioPipes)> {
use crate::sys::cvt_r;
// const CLOEXEC_MSG_FOOTER: &'static [u8] = b"NOEX";
let envp = self.capture_env();

if self.saw_nul() {
Expand Down Expand Up @@ -61,6 +60,9 @@ impl Command {
t!(cvt(libc::chdir(cwd.as_ptr())));
}

// pre_exec closures are ignored on VxWorks
let _ = self.get_closures();

let c_envp = envp
.as_ref()
.map(|c| c.as_ptr())
Expand Down

0 comments on commit aa46f08

Please sign in to comment.