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.
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_FDSenvironment 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-proxydshould 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.