Skip to content

Commit aa46f08

Browse files
committed
Apply suggestions from code review
1 parent 9bd9cbb commit aa46f08

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

library/std/src/sys/unix/process/process_common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ impl Command {
223223
pub fn get_groups(&self) -> Option<&[gid_t]> {
224224
self.groups.as_deref()
225225
}
226-
#[allow(dead_code)]
226+
227227
pub fn get_closures(&mut self) -> &mut Vec<Box<dyn FnMut() -> io::Result<()> + Send + Sync>> {
228228
&mut self.closures
229229
}

library/std/src/sys/unix/process/process_vxworks.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ impl Command {
1818
needs_stdin: bool,
1919
) -> io::Result<(Process, StdioPipes)> {
2020
use crate::sys::cvt_r;
21-
// const CLOEXEC_MSG_FOOTER: &'static [u8] = b"NOEX";
2221
let envp = self.capture_env();
2322

2423
if self.saw_nul() {
@@ -61,6 +60,9 @@ impl Command {
6160
t!(cvt(libc::chdir(cwd.as_ptr())));
6261
}
6362

63+
// pre_exec closures are ignored on VxWorks
64+
let _ = self.get_closures();
65+
6466
let c_envp = envp
6567
.as_ref()
6668
.map(|c| c.as_ptr())

0 commit comments

Comments
 (0)