[systemd-devel] [PATCH 1/3] core: Add LISTEN_NAMES environment variable
zbyszek at in.waw.pl
Mon May 18 10:55:55 PDT 2015
On Mon, May 18, 2015 at 06:01:10PM +0200, Lennart Poettering wrote:
> Being able to attach a name to the fds is hence really useful. logind
> could use this to attach the session identifier to the fds, and would
> hence be able to safely map the fds back to their sessions after
> coming back from a restart...
Yeah, that makes sense. But currently there's no proposal how to specify
those identifiers. Would be nice discuss both sides of the proposal at
the same time.
sd_pid_notify_with_fds() would probably have to be extended to be
sd_pid_notify_with_fds2(pid_t pid, int unset_environment, const char *state, const int *fds, const char* const *names, unsigned n_fds)
And what about socket units: we could automatically generate identifiers
like blah.socket-1, foo.socket-1, foo.socket-2 to allow sockets from multiple
socket files be distinguished. In principle this could be made configurable
through a new option, but I don't think it's worth the trouble.
More information about the systemd-devel