-
Notifications
You must be signed in to change notification settings - Fork 677
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
Missing example for nix::sys::signal::SigHandler #319
Comments
Thanks for the report! You have picked up on an issue of how close to the system APIs nix should be, which we've been discussing in #190. The current thinking is that the more rustic API you're describing would belong in an external library, possibly under the nix umbrella. The hypothetical nix-core would remain closer to the system. In any case, a working example would be a great addition. @fiveop do you have any working code we could add in a doctest? |
You would need to use the type As much as we want to encapsulate libc functionality in a Rust idomatic way, at the end of the day the user has to write the signal handlers himself and thus deal with the low level function signatures, hence libc types. |
I see explicit Are usual doctests embedded in the module (skipping visibility problems)? |
That indicates that the docs are not up to date. Where do you look at the docs? (Do we even publish new docs with a new version at the moment?) |
http://rustdoc.s3-website-us-east-1.amazonaws.com/nix/master/linux/nix/sys/signal/index.html Linked from README.md in this repository. |
Hrm, I wonder why the docs are not being updated. Opened #320. In the meantime, for docs on the most recently released version on crates.io you can use crates.fyi: https://crates.fyi/crates/nix/ |
Docs are generated on every release at docs.rs, so that's no longer an issue here. However, there is still the issue with docs being missing for |
I'm trying to write a signal handler that gets some usable value, with SigHandler::SigAction, but, for example,
siginfo
is stopping me right now:->
,
->
How do I really do it?
In general working with signals using nix-rust feels like interfacing with C instead of using rustic wrappers...
Are there any more high-level libraries?Maybe I just want chan_signal.The text was updated successfully, but these errors were encountered: