Giter Club home page Giter Club logo

sendfd's People

Contributors

absolucy avatar dependabot-preview[bot] avatar ekleog avatar ishitatsuyuki avatar jedisct1 avatar lovesegfault avatar nagisa avatar nobodyxu avatar tim-zhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sendfd's Issues

sendfd mess up tokio's internal registration

Pardon me, I didn't test this, but I think sendfd's tokio integration is not implemented in a way that is compatible with its internal readiness tracking.

When one is using RecvWithFd, they will probably keep calling recv_with_fd until it returns WouldBlock. However this has an issue that tokio is not aware of this returned WouldBlock: as a result, it will keep assuming that the socket is ready to read, unless a call to tokio's poll_read function is made. If it's an situation where every message can contain an fd, then we can't call tokio's poll_read, because if the read is success, the kernel would close the fds that should have been received, because tokio uses readv().

The tokio APIs uses internal functions that clears readiness flags when WouldBlock is encountered:

https://github.com/tokio-rs/tokio/blob/a08ce0d3e06d650361283dc87c8fe14b146df15d/tokio/src/io/driver/registration.rs#L182

But again, I don't think sendfd is able to call into this API.

The same applies to SendWithFd to some extent, although sendmsg on a Unix socket should rarely block so it might "appear" to work.

So I don't think the tokio integration really works; can anyone confirm that?

Release v0.4.1

It looks like v0.4.1 is ready but not available on crates.io right now.

Would you mind doing a release?

Also, Git tag seems to be missing for v0.4.0 and v0.4.1.

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.