Support socket fd inheritance for systemd socket activation · Issue #7939 · coder/code-server · GitHub
Skip to content

Support socket fd inheritance for systemd socket activation #7939

Description

@runleveldev

What is your suggestion?

Implement a CLI argument to specify a file descriptor to bind to instead of directly binding to a inet or unix socket.

Why do you want this feature?

systemd allows services to be activated by sockets managed by itself keeping resource usage as none until needed. For this to work properly, the service has to accept a file descriptor specified by LISTEN_FDS environment variable (but predictibly starting at 3) instead of creating it's own listen socket.

Are there any workarounds to get this functionality today?

systemd-socket-proxyd should work but it creates a requirement of 2 new systemd units and an extra tcp port. Implementing a socket-fd parameter makes this a lot simpler.

Are you interested in submitting a PR for this?

yes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions