sockets: improve abstract Unix socket handling - #162
Merged
Conversation
2 tasks
thaJeztah
force-pushed
the
abstract_sockets
branch
4 times, most recently
from
July 24, 2026 16:33
b41a60d to
c5a78d5
Compare
thaJeztah
force-pushed
the
abstract_sockets
branch
2 times, most recently
from
July 24, 2026 17:16
528c083 to
f8a57bb
Compare
thaJeztah
marked this pull request as ready for review
July 24, 2026 17:18
vvoland
reviewed
Jul 24, 2026
| return func(path string) error { | ||
| if isAbstractSocket(path) { | ||
| return &os.PathError{ | ||
| Op: "chmod", |
Contributor
There was a problem hiding this comment.
Suggested change
| Op: "chmod", | |
| Op: "chown", |
?
Member
Author
There was a problem hiding this comment.
doh! copy/pasta; fixed
thaJeztah
force-pushed
the
abstract_sockets
branch
from
July 24, 2026 17:49
f8a57bb to
ac9625f
Compare
Improve handling of abstract Unix socket addresses across platforms. On Linux, abstract sockets are supported but do not have a filesystem representation, so filesystem-specific operations such as unlinking an existing socket or applying ownership and permissions are skipped or rejected as appropriate. On platforms without abstract socket support, attempts to create an abstract socket now fail with a clear unsupported error instead of falling through to platform-specific failures. Add regression tests covering abstract socket behavior, including both Go's Linux-specific "@" shorthand and the native leading-NUL representation. The tests verify the expected behavior on supported and unsupported platforms and guard against regressions in permission handling. The new tests verify that abstract sockets: - can be created and used like regular Unix sockets; - do not create a filesystem entry while the listener is active; and - do not leave a filesystem entry behind after the listener is closed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah
force-pushed
the
abstract_sockets
branch
from
July 24, 2026 17:50
ac9625f to
f3526e5
Compare
vvoland
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sockets: improve abstract Unix socket handling
Improve handling of abstract Unix socket addresses across platforms.
On Linux, abstract sockets are supported but do not have a filesystem
representation, so filesystem-specific operations such as unlinking an
existing socket or applying ownership and permissions are skipped or
rejected as appropriate.
On platforms without abstract socket support, attempts to create an
abstract socket now fail with a clear unsupported error instead of
falling through to platform-specific failures.
Add regression tests covering abstract socket behavior, including both
Go's Linux-specific "@" shorthand and the native leading-NUL
representation. The tests verify the expected behavior on supported and
unsupported platforms and guard against regressions in permission
handling.
The new tests verify that abstract sockets:
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)