mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #466] Support for Abstract Unix Socket #256
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DCsunset on GitHub (Oct 21, 2024).
Original GitHub issue: https://github.com/sigoden/dufs/issues/466
Specific Demand
Linux and Android support abstract Unix sockets where sockets are kept in an abstract namespace that is independent of the filesystem.
It is more convenient that normal Unix socket in many cases as it doesn't require creating any socket file.
For example, Go language natively supports abstract Unix socket by listening on a path starting with
@.Implement Suggestion
Implementing this feature is not very difficult as Rust supports it for Linux and Android: https://doc.rust-lang.org/stable/std/os/linux/net/trait.SocketAddrExt.html#tymethod.from_abstract_name.
However, there are two possible approaches:
@as a prefix to a Unix socket path to represent an abstract socket (which is used in other languages like Go)--bind-abstract)It would be great to see this implemented. I'm also happy to help with it if there is any plan to add it.