Code Monkey home page Code Monkey logo

async-signal's People

Contributors

notgull avatar taiki-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shabbirhasan1

async-signal's Issues

please add license files + include them in published crates

I'm looking into packaging this crate for Fedora Linux as a new dependency of the async-process crate. Currently this crate does not include any license texts, but both the MIT and the Apache-2.0 license require that (re)distributed sources contain a copy of the license text. This is a problem from a distribution point of view, and blocks work on providing a package for this crate (and updating async-process to the latest versions).

Use signalfd on Linux

Linux supports signalfd, which can be used to wait for signals in epoll without needing to clone several pipes like we do in the current implementation. On Linux, we should use that instead.

Should we disable the default signal handler when we register it?

Right now, when a signal is registered via the Signals type, the default signal handler is disabled. This requires the user to manually call the low-level signal handler. This is probably what's desired for most cases, like handling SIGINT, since the default signal handler for SIGINT ends the application. However, for other signals, it may be desired to call the default signal handler. I think there should be an option in add_signals or other to call the default signal handler on receipt.

Windows Support

Windows supports signals as well (albeit a significantly smaller set than what Unix supports). It would be good to support those signals here.

However, the current notification (an asynchronous pipe) isn't supported by async-io yet. We could either use Windows UDS sockets, which would work out of the box in this case but aren't available on older versions of Windows, or we could work named pipes into async-io/polling, which would be harder but also open up more opportunities.

`concurrent-queue` is unavailable for `android` target

concurrent-queue is imported (in Cargo.toml) only if target is linux, but is used when target is linux OR android.

So, async-signal last release (v0.2.1) does not build on android target.

Thank you !

Cargo.toml

[target.'cfg(target_os = "linux")'.dependencies]
concurrent-queue = "2.2.0"

lib.rs

} else if #[cfg(any(target_os = "android", target_os = "linux"))] {
    mod signalfd;
    use signalfd as sys;
}

signalfd.rs

use concurrent_queue::ConcurrentQueue;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.