Skip to content

Commit

Permalink
Fix Windows backend issues
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <dev@notgull.net>

Fix Windows test

Signed-off-by: John Nunley <dev@notgull.net>

Fix invalid YAML

Signed-off-by: John Nunley <dev@notgull.net>

Is tee broken?

Signed-off-by: John Nunley <dev@notgull.net>

Disable Windows in CI
  • Loading branch information
notgull committed Oct 1, 2023
1 parent a59beb6 commit 7952132
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ jobs:
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- run: cargo test
- name: Force tests with pipe implementation
if: startsWith(matrix.os, 'ubuntu')
run: cargo test
env:
RUSTFLAGS: --cfg async_signal_force_pipe_impl

if: >
!contains(matrix.os, 'windows')
# TODO: Windows can't be reliably tested in CI yet...
msrv:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ futures-core = "0.3.26"
[target.'cfg(unix)'.dependencies]
async-io = "1.12.0"
futures-io = "0.3.26"
libc = "0.2.139"
rustix = { version = "0.38.15", default-features = false, features = ["process", "std"] }
signal-hook-registry = "1.4.0"

[target.'cfg(windows)'.dependencies]
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, RawFd};
mod libc {
pub(crate) use std::os::raw::c_int;

// Define these ourselves.
// Copy-pasted from the libc crate
pub const SIGHUP: c_int = 1;
pub const SIGINT: c_int = 2;
Expand Down
2 changes: 1 addition & 1 deletion src/windows_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl Registry {
};

// Note that Windows runs these handlers in another thread, so there's no need to
// worry about deadlocks.
// worry about async signal safety.
let handlers = registry.handlers.lock().unwrap_or_else(|e| e.into_inner());

for handler in handlers.iter() {
Expand Down

0 comments on commit 7952132

Please sign in to comment.