Skip to content

A scoped signal forwarder.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Tamschi/mirror-mask

mirror-mask

Lib.rs Crates.io Docs.rs

Rust 1.51 CI Crates.io - License

GitHub open issues open pull requests good first issues

crev reviews

A scoped signal deflector.

(Unrelated to the 2005 fantasy film of similar name.)

Current operating system support: Unix (via the nix crate).

The crate otherwise compiles without function, unless the "required" feature (active by default) is active.

Installation

Please use cargo-edit to always add the latest version of this library:

cargo add mirror-mask

If your program does not rely on mirror-mask for correctness, you can allow it to compile without function for unsupported targets.

cargo add mirror-mask --no-default-features

Example

let mut child = std::process::Command
  ::new("ping")
  .args(["example.com", "-c", "3"])
  .spawn().unwrap();

{
  let _relay_guard = mirror_mask::Intent::InterruptFromKeyboard.relay_to_child(&child); // <--
  child.wait().ok(); // Press Ctrl-c about here.
}

println!("Still alive!");

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING for more information.

Interactive Testing

Run

cargo run --all-features

or

cargo run --all-features -- -r

and press (with -r/--recursive repeatedly Enter and then) Ctrl+c.

The program should exit gracefully.

Versioning

mirror-mask strictly follows Semantic Versioning 2.0.0 with the following exceptions:

  • The minor version will not reset to 0 on major version changes (except for v1).
    Consider it the global feature level.
  • The patch version will not reset to 0 on major or minor version changes (except for v0.1 and v1).
    Consider it the global patch level.

This includes the Rust version requirement specified above.
Earlier Rust versions may be compatible, but this can change with minor or patch releases.

Which versions are affected by features and patches can be determined from the respective headings in CHANGELOG.md.

Note that dependencies of this crate may have a more lenient MSRV policy! Please use cargo +nightly update -Z minimal-versions in your automation if you don't generate Cargo.lock manually (or as necessary) and require support for a compiler older than current stable.

About

A scoped signal forwarder.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages