Git Product home page Git Product logo

Comments (6)

vhbit avatar vhbit commented on July 18, 2024

@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.

fiveop avatar fiveop commented on July 18, 2024

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.

carllerche avatar carllerche commented on July 18, 2024

Great! Looking forward to it.

from nix.

fiveop avatar fiveop commented on July 18, 2024

#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.

kamalmarhubi avatar kamalmarhubi commented on July 18, 2024

Filed #264 to track the first part. I'll start on the signal module which should let us close this.

from nix.

fiveop avatar fiveop commented on July 18, 2024

8f1d193 fixes the first part, which should resolve this issue.

from nix.

Related Issues (20)

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.