Skip to content

Factor out serveUnixSocket#15187

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:serve-unix-socket
Feb 10, 2026
Merged

Factor out serveUnixSocket#15187
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:serve-unix-socket

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 10, 2026

Motivation

This commit extracts the Unix domain socket server loop (PeerInfo, getPeerInfo, and the systemd socket activation / poll / accept loop) from src/nix/unix/daemon.cc into a reusable unix::serveUnixSocket function in libcmd.

Context

This was split out from #15184.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@amaanq amaanq requested a review from edolstra as a code owner February 10, 2026 15:58
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Feb 10, 2026
Comment on lines -416 to -417
listeningSockets.clear();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should go back

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(writing down what we said on call) yeah will need to be a callback because scoping.

@amaanq amaanq force-pushed the serve-unix-socket branch 2 times, most recently from c5524d6 to e1cc9ff Compare February 10, 2026 16:05
This commit extracts the Unix domain socket server loop (`PeerInfo`,
`getPeerInfo`, and the systemd socket activation / poll / accept loop)
from `src/nix/unix/daemon.cc` into a reusable `unix::serveUnixSocket`
function in `libcmd`.
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one more thing

@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 10, 2026
Merged via the queue into NixOS:master with commit 582e4fa Feb 10, 2026
15 checks passed
@Ericson2314 Ericson2314 deleted the serve-unix-socket branch February 10, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants