Skip to content

Support systemd socket activation with multiple sockets#7892

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:systemd-multi-socket
Feb 2, 2026
Merged

Support systemd socket activation with multiple sockets#7892
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:systemd-multi-socket

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 commented Feb 23, 2023

Motivation

We now support LISTEN_FDS values greater than 1, per the systemd socket activation spec.

Context

These changes are by @edolstra, taken from #5265. This is just that PR without the TCP parts, which I gathered are the controversial parts. Hopefully this remainder is not so controversial.

Review with indentation ignored, because some code has moved inside a new loop but otherwise is mostly unchanged.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

@Ericson2314 Ericson2314 marked this pull request as draft February 23, 2023 17:48
@Ericson2314
Copy link
Copy Markdown
Member Author

Will need to fix macOS failure.

@Ericson2314 Ericson2314 force-pushed the systemd-multi-socket branch from f38006b to 9aedd37 Compare March 16, 2023 23:45
@Ericson2314 Ericson2314 force-pushed the systemd-multi-socket branch 2 times, most recently from 310266c to ab3a602 Compare April 8, 2023 22:14
@Ericson2314 Ericson2314 force-pushed the systemd-multi-socket branch from ab3a602 to 864ff3d Compare May 10, 2023 22:06
@github-actions github-actions Bot added the new-cli Relating to the "nix" command label May 10, 2023
@Ericson2314 Ericson2314 changed the title Support systemd socket activation support more comprensively Support systemd socket activation with multiple sockets Jan 29, 2026
@Ericson2314 Ericson2314 marked this pull request as ready for review January 29, 2026 15:57
@Ericson2314
Copy link
Copy Markdown
Member Author

I'm hoping that not passing nullptr to accept (since we're not worried about TCP for now) might help with the macOS issue, but this just a wild guess since the old logs are gone.

Comment thread src/nix/unix/daemon.cc Outdated
if (errno == EINTR)
continue;
throw SysError("accepting connection");
throw SysError("poll");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not descriptinve

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, fixed.

We now support `LISTEN_FDS` values greater than 1, per the systemd
socket activation spec.

These changes are by @edolstra, taken from NixOS#5265. This is just that PR
*without* the TCP parts, which I gathered are the controversial parts.
Hopefully this remainder is not so controversial.

Review with indentation ignored, because some code has moved inside a
new loop but otherwise is mostly unchanged.
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 2, 2026
Merged via the queue into NixOS:master with commit 663d27c Feb 2, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the systemd-multi-socket branch February 2, 2026 16:48
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
Support systemd socket activation with multiple sockets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants