]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-daemon/sd-daemon.c
core: add support for naming file descriptors passed using socket activation
authorLennart Poettering <lennart@poettering.net>
Sun, 4 Oct 2015 15:36:19 +0000 (17:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Oct 2015 09:52:48 +0000 (11:52 +0200)
commit8dd4c05b5495c7ffe0f12ace87e71abe17bd0a0e
tree30a788ca911facca15b4f1fa8641e78753caa574
parent79c7626d1f239e02152ad698298a1b5d0e9fbacf
core: add support for naming file descriptors passed using socket activation

This adds support for naming file descriptors passed using socket
activation. The names are passed in a new $LISTEN_FDNAMES= environment
variable, that matches the existign $LISTEN_FDS= one and contains a
colon-separated list of names.

This also adds support for naming fds submitted to the per-service fd
store using FDNAME= in the sd_notify() message.

This also adds a new FileDescriptorName= setting for socket unit files
to set the name for fds created by socket units.

This also adds a new call sd_listen_fds_with_names(), that is similar to
sd_listen_fds(), but also returns the names of the fds.

systemd-activate gained the new --fdname= switch to specify a name for
testing socket activation.

This is based on #1247 by Maciej Wereski.

Fixes #1247.
26 files changed:
Makefile-man.am
man/sd_listen_fds.xml
man/sd_notify.xml
man/systemd-activate.xml
man/systemd.socket.xml
man/systemd.xml
src/activate/activate.c
src/basic/strv.c
src/basic/strv.h
src/basic/util.c
src/basic/util.h
src/core/dbus-socket.c
src/core/execute.c
src/core/execute.h
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/manager.c
src/core/service.c
src/core/service.h
src/core/socket.c
src/core/socket.h
src/libsystemd/sd-daemon/sd-daemon.c
src/systemd/sd-daemon.h
src/test/test-daemon.c
src/test/test-strv.c