]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-nbd.c
qemu-nbd: Implement socket activation.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 4 Feb 2017 10:03:17 +0000 (10:03 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Feb 2017 14:30:45 +0000 (15:30 +0100)
commita721f53b8f6a30fdc2b6e9fca13ec6c2d762b996
treefd16c92d396465444058815adf765f689f61c861
parent41eeb0e601cbc7ac28fa35547d2426f349ef137d
qemu-nbd: Implement socket activation.

Socket activation (sometimes known as systemd socket activation)
allows an Internet superserver to pass a pre-opened listening socket
to the process, instead of having qemu-nbd open a socket itself.  This
is done via the LISTEN_FDS and LISTEN_PID environment variables, and a
standard file descriptor range.

This change partially implements socket activation for qemu-nbd.  If
the environment variables are set correctly, then socket activation
will happen automatically, otherwise everything works as before.  The
limitation is that LISTEN_FDS must be 1.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Message-Id: <20170204100317.32425-2-rjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-nbd.c