Comments (6)
@vbuslov there is no way to define unions in Rust, in case of data with the same size (like pointer to a function) workaround is to use mem::transmute
.
from nix.
I have the same problem and was thinking of using one or two enums to encapsulate the differences between sa_handler
, sa_sigaction
as well as the difference between an actual function pointer and SIG_IGN
and SIG_DFL
. I'll work on a proposal.
from nix.
Great! Looking forward to it.
from nix.
#241 would solve the second part of the question. The first would be solved by using libc's raw structs instead of our own. See https://github.com/rust-lang-nursery/libc/blob/master/src/unix/bsd/apple/mod.rs .
from nix.
Filed #264 to track the first part. I'll start on the signal module which should let us close this.
from nix.
8f1d193 fixes the first part, which should resolve this issue.
from nix.
Related Issues (20)
- nix 0.27 `Epoll` API should be marked `unsafe` HOT 10
- `SignalFd::set_mask` closes the signal file descriptor
- PollFd::new requires too restrictive lifetime HOT 2
- `recvmmsg` may cause UB HOT 2
- Support eventfd on FreeBSD
- Expose MAP_HUGE_SHIFT
- Introduce `mmap_nofd` to work around `<F: AsFd>`? HOT 4
- FdSet is difficulty to use HOT 1
- New maintainers wanted HOT 13
- Add `cargo-semver-checks` to automate checking for breaking changes. HOT 4
- Cargo test fails HOT 3
- Question about how the code is formatted HOT 3
- Switch to libc wrapper instead of raw syscall for `gettid()` and `execveat()` HOT 3
- Calling an ioctl_none! with unflushed stdout leads to uninitialized memory access. HOT 3
- Should we add a `rust-toolchain.toml` to pin the toolchain to the MSRV HOT 2
- Out of $$$ for CI HOT 6
- Consider enabling the `unsafe_op_in_unsafe_fn` lint HOT 1
- `Epoll::add` works differently comparing to `epoll::epoll_ctl` HOT 1
- Mechanism to query existing signal handler HOT 2
- reboot api on openbsd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nix.