Skip to content

Config strings: '!@name' is a Linux abstract Unix socket - #3165

Merged
mgravell merged 1 commit into
mainfrom
marc/uds-abstract-config
Aug 6, 2026
Merged

Config strings: '!@name' is a Linux abstract Unix socket#3165
mgravell merged 1 commit into
mainfrom
marc/uds-abstract-config

Conversation

@mgravell

@mgravell mgravell commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Support the socat/systemd '@' convention.

'!name' has always meant a Unix domain socket, but '!@foo' silently produced a PATHNAME socket literally named '@foo' -- the wrong socket, found by nothing. The parse now maps '@' after '!' to the kernel's leading-NUL spelling, Linux-gated (no other platform has the namespace; elsewhere '@' stays a literal filename, matching redis-cli). ToString round-trips for free: UnixDomainSocketEndPoint renders abstract names back as '@name'.

Tests: FormatTests gains UDS parse/round-trip coverage (there was NONE, even for pathnames) -- pathname and abstract cells, the latter Linux-gated. Verified live end-to-end besides: a ConnectionMultiplexer built from ConfigurationOptions.Parse("!@se-abs-test,abortConnect=true") against a Garnet listening on the same abstract name, SET/GET round-trip clean, no filesystem footprint.

Checklist

  • I fully and freely contribute this code in accordance with the project license (and am legally able to do so)
  • I take responsibility for this contribution's quality and correctness, including any portions produced with AI assistance (see CONTRIBUTING.md).

…md '@' convention)

'!name' has always meant a Unix domain socket, but '!@foo' silently produced a PATHNAME socket
literally named '@foo' -- the wrong socket, found by nothing. The parse now maps '@' after '!' to the
kernel's leading-NUL spelling, Linux-gated (no other platform has the namespace; elsewhere '@' stays a
literal filename, matching redis-cli). ToString round-trips for free: UnixDomainSocketEndPoint renders
abstract names back as '@name'.

Tests: FormatTests gains UDS parse/round-trip coverage (there was NONE, even for pathnames) -- pathname
and abstract cells, the latter Linux-gated. Verified live end-to-end besides: a ConnectionMultiplexer
built from ConfigurationOptions.Parse("!@se-abs-test,abortConnect=true") against a Garnet listening
on the same abstract name, SET/GET round-trip clean, no filesystem footprint.
@mgravell
mgravell merged commit 0ee2082 into main Aug 6, 2026
6 checks passed
@mgravell
mgravell deleted the marc/uds-abstract-config branch August 6, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant