Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(force_waker_pipe): swap receiver and sender fd #1722

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ jobs:
run: cargo test --all-features
- name: Tests release build
run: cargo test --release --all-features
TestWakerPipe:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
RUSTFLAGS: "--cfg mio_unsupported_force_waker_pipe"
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Tests
run: cargo test --all-features
- name: Tests release build
run: cargo test --release --all-features
MinimalVersions:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix/waker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ mod pipe {

impl WakerInternal {
pub fn new() -> io::Result<WakerInternal> {
let [sender, receiver] = pipe::new_raw()?;
let [receiver, sender] = pipe::new_raw()?;
let sender = unsafe { File::from_raw_fd(sender) };
let receiver = unsafe { File::from_raw_fd(receiver) };
Ok(WakerInternal { sender, receiver })
Expand Down