socket-server: Add support for systemd socket activation.

This adds support to module-native-protocol-unix to take over already
listening sockets passed in via socket activation (e.g. from systemd)

Most of the code is isolated to socket-server but some cleanup code also
had to be tweaked to ensure we do not overzealously close open fds.
This commit is contained in:
Colin Guthrie 2014-10-16 10:05:19 +01:00
parent fb1ca6f0c1
commit 467b4b9bee
5 changed files with 116 additions and 29 deletions

View file

@ -706,6 +706,10 @@ libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(X11_CFLAGS)
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
endif
if HAVE_SYSTEMD_DAEMON
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
endif
if HAVE_SYSTEMD_JOURNAL
libpulsecommon_@PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDJOURNAL_FLAGS)
libpulsecommon_@PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDJOURNAL_LIBS)