Skip to content

Commit

Permalink
move import to fix warning with emscripten target
Browse files Browse the repository at this point in the history
  • Loading branch information
anonion0 committed Apr 17, 2022
1 parent c492355 commit e6aafbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/std/src/sys/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl Command {
stdio: ChildPipes,
maybe_envp: Option<&CStringArray>,
) -> Result<!, io::Error> {
use crate::sys::{self, cvt_nz, cvt_r};
use crate::sys::{self, cvt_r};

if let Some(fd) = stdio.stdin.fd() {
cvt_r(|| libc::dup2(fd, libc::STDIN_FILENO))?;
Expand Down Expand Up @@ -324,6 +324,7 @@ impl Command {
#[cfg(not(target_os = "emscripten"))]
{
use crate::mem::MaybeUninit;
use crate::sys::cvt_nz;
// Reset signal handling so the child process starts in a
// standardized state. libstd ignores SIGPIPE, and signal-handling
// libraries often set a mask. Child processes inherit ignored
Expand Down

0 comments on commit e6aafbc

Please sign in to comment.