Skip to content

Commit

Permalink
feat: Implement IoSafe for the child process stdio types
Browse files Browse the repository at this point in the history
Implement IoSafe for the child process stdio types
  • Loading branch information
notgull authored Oct 19, 2023
2 parents 7e89eec + ef3e9c6 commit 9d015dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ jobs:
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
- run: rustup target add ${{ matrix.target }}
# https://github.com/rust-lang/rust/issues/49078
- name: Fix windows-gnu rust-mingw
run : |
for i in crt2.o dllcrt2.o libmingwex.a libmsvcrt.a ; do
cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/x86_64-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/x86_64-pc-windows-gnu/lib"
done
- run: cargo build --target ${{ matrix.target }} --all --all-features --all-targets
- run: cargo test --target ${{ matrix.target }}

Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,9 @@ unsafe impl IoSafe for std::io::StderrLock<'_> {}
unsafe impl IoSafe for std::io::StdinLock<'_> {}
unsafe impl IoSafe for std::io::StdoutLock<'_> {}
unsafe impl IoSafe for std::net::TcpStream {}
unsafe impl IoSafe for std::process::ChildStdin {}
unsafe impl IoSafe for std::process::ChildStdout {}
unsafe impl IoSafe for std::process::ChildStderr {}

#[cfg(unix)]
unsafe impl IoSafe for std::os::unix::net::UnixStream {}
Expand Down

0 comments on commit 9d015dc

Please sign in to comment.