Skip to content

Commit

Permalink
fix merge conflict with windows FdEvent handling
Browse files Browse the repository at this point in the history
  • Loading branch information
iximeow committed Feb 1, 2020
1 parent aea207d commit 7f2bb9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ fn handle_rw_event(event: FdEventData, out_events: &mut Vec<wasi::__wasi_event_t
Descriptor::Stdin => Ok(1),
// On Unix, ioctl(FIONREAD) will return 0 for stdout/stderr. Emulate the same behavior on Windows.
Descriptor::Stdout | Descriptor::Stderr => Ok(0),
Descriptor::VirtualFile(_) => {
panic!("virtual files do not get rw events");
}
};

let new_event = make_rw_event(&event, size);
Expand Down Expand Up @@ -299,6 +302,9 @@ pub(crate) fn poll_oneoff(
unreachable!();
}
}
Descriptor::VirtualFile(_) => {
panic!("virtual files do not get rw events");
}
}
}

Expand Down

0 comments on commit 7f2bb9b

Please sign in to comment.