Typo fix, should have close and dup stderr instead of stdout

This commit is contained in:
Yan Ka, Chiu
2023-07-13 07:39:36 -04:00
parent 64a34cb444
commit ffdff8a00a

View File

@@ -117,8 +117,8 @@ pub(super) fn spawn_process_forward(
freebsd::libc::dup2(fd, 1);
}
if let Some(fd) = stderr {
freebsd::libc::close(1);
freebsd::libc::dup2(fd, 1);
freebsd::libc::close(2);
freebsd::libc::dup2(fd, 2);
}
Ok(())
});