[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 02/14] libxenstore.so: add support for systemd
On Tue, 2014-05-20 at 05:31 -0700, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx> > > This adds support for systemd into libxenstore.so to enable usage > through cxenstored and oxenstored. The way we provide support for > systemd is to *not* compile systemd with -lsystemd-daemon but instead > to look for libsystemd-daemon.so at run time if the binary was compiled > with support for systemd. This is not what either Ian or I intended to suggest. It is perfectly fine for the binary to be dynamically linked against -lsystemd-daemon in the normal way (and for the resulting binary packages to depend on the libsystemd-daemon package etc) if the headers etc are present at compile time. What we were after was for the actual use of systemd to be runtime not compile time. IOW it is fine for xenstored to require the library to be installed, but not that systemd be the init which is in use. > Before using systemd though we check if the > system was booted with systemd as the init process by using sd_booted() > and only if this is true will we assume that's the only mechanism > allowed. For systems that do not have systemd present or that have systemd > libraries present but did not boot with systemd the old init unix socket > creation mechanism will be used. > > Systems that do not use unix sockets at all will continue to chug on as > they used to skipping all this unix socket actication and relying on the "activation" > kernel ring interface, used for exampl when CONFIG_STUBDOM=y which sets "example" > diff --git a/tools/xenstore/xs_systemd.c b/tools/xenstore/xs_systemd.c > new file mode 100644 > index 0000000..814e0fc > --- /dev/null > +++ b/tools/xenstore/xs_systemd.c > + > +/* > + * We list stdin, stdout and stderr simply for documentation purposes > + * and to help our array size fit the number of expected sockets we > + * as sd_listen_fds() will return 5 for example if you set the socket > + * service with 2 sockets. Please can we get rid of this list (which is bad enough in itself but the three spurious entries are ludicrous) and just #define SOCKET_RW_INDEX SD_LISTEN_FDS_START #define SOCKET_RO_INDEX SDL_LISTEN_FDS_START + 1 etc and use those for lookups, as I described in <1399971222.11314.27.camel@xxxxxxxxxxxxxxxxxxxxxx>? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |