Apply suggestions from code review

This commit is contained in:
Christiaan Dirkx
2021-04-21 16:06:32 +02:00
parent 9bd9cbb28e
commit aa46f08abd
2 changed files with 4 additions and 2 deletions

View File

@@ -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() {
@@ -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())