-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-openbsdOperating system: OpenBSDOperating system: OpenBSDT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
I tried this code on my Linux machine:
use std::os::unix::net::UnixListener;
fn main() {
let listener = UnixListener::bind("/tmp/rust-uds.sock").unwrap();
println!("{:?}", listener.local_addr().unwrap());
}
I got this output:
"/tmp/rust-uds.sock" (pathname)
However, on OpenBSD 7, I got this output:
"/tmp/rust-uds.sock\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" (pathname)
I expected the output to be the same as Linux: not padded with zeroes like this.
Meta
rustc --version --verbose
:
$ rustc --version --verbose
rustc 1.63.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-openbsd
release: 1.63.0
LLVM version: 13.0.0
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-openbsdOperating system: OpenBSDOperating system: OpenBSDT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.