-
Notifications
You must be signed in to change notification settings - Fork 681
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
Socket leak in multi-thread context #1425
Comments
Yes, that's right. Nix's |
If you can’t easily fix this problem, it’s probably a good idea to document this behaviour, I spent a lot of time to understand why my cron job reach the limit of file descriptors. |
Nix's safety guarantees do not currently extent to "correct" or "expected" behaviour on the OS side. Safety is guaranteed with regard to memory safety of the rust program itself, but not in side-effects of the OS. To find out what Nix-functions do you need to read the frequently linked OS-documentation and nothing in the documentation of bind() speaks about closing the socket. Maybe we need a better crate-level description of this than "Rust friendly bindings to the various *nix system functions." |
Closing this issue. I couldn't have explained it better than FloLo100. |
Hello,
This code leaves sockets in UNCONN state on
x86_64-unknown-linux-gnu
target:The text was updated successfully, but these errors were encountered: