mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
This adds systemd socket activation support for the Ocaml xenstored. Ocaml lacks systemd library support so we provide our own C helpers as is done with other functionality lacking on Ocaml. Active sockets enables oxenstored to be loaded only if required by a system onto which Xen is installed on. Socket activation is handled by systemd, once a port for a service which claims a socket is used systemd will start the required services for it, on demand. For more details on socket activation refer to Lennart's socket-activation post regarding this [0]. An important difference with socket activation is that systemd will set FD_CLOEXEC for us on the socket before giving it to us, we'll sprinkly the Unix.set_close_on_exec for LSB init next as a separate commit. Right now this code adds a no-op for this functionality, leaving the enablement to be done later once systemd is properly hooked into the build system. The socket activation is ordered in aligment with the socket activation order passed on to systemd. [0] http://0pointer.de/blog/projects/socket-activation2.html Cc: David Scott <dave.scott@eu.citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Vincent Hanquez <Vincent.Hanquez@eu.citrix.com> Acked-by: Dave Scott <Dave.Scott@citrix.com> Acked-by: Anil Madhavapeddy <anil@recoil.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>