-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add unix socket support to the standard library #32302
Conversation
This is a straight copy-paste from the rust-lang-nursery/unix-socket crate with the linux-specific |
} | ||
} | ||
|
||
struct Inner(RawFd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have std::sys::fd::FileDesc
for this, perhaps this could use that?
Updated |
let (addr, len) = try!(sockaddr_un(path)); | ||
|
||
let ret = libc::connect(*inner.as_inner(), &addr as *const _ as *const _, len); | ||
if ret < 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this use cvt
?
Re-updated |
@bors: r+ 48ed34c6dcc7d24f0388f43262fa5e79d197f110 |
⌛ Testing commit 48ed34c with merge faeb1af... |
@bors: retry force clean |
⌛ Testing commit 48ed34c with merge 5098719... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
@bors r=alexcrichton |
📌 Commit 94de5ba has been approved by |
⌛ Testing commit 94de5ba with merge 0cfbb37... |
💔 Test failed - auto-mac-64-nopt-t |
f28123c
to
ab20e8d
Compare
@bors r=alexcrichton |
📌 Commit ab20e8d has been approved by |
Add unix socket support to the standard library r? @alexcrichton
💔 Test failed - auto-mac-64-nopt-t |
@bors r=alexcrichton |
📌 Commit c0d989e has been approved by |
Add unix socket support to the standard library r? @alexcrichton
r? @alexcrichton