From 53fabd4b86e15869e13fb762686d674c64294385 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 16 Mar 2017 16:29:45 +0100 Subject: qemu-ga: obey LISTEN_PID when using systemd socket activation qemu-ga's socket activation support was not obeying the LISTEN_PID environment variable, which avoids that a process uses a socket-activation file descriptor meant for its parent. Mess can for example ensue if a process forks a children before consuming the socket-activation file descriptor and therefore setting O_CLOEXEC on it. Luckily, qemu-nbd also got socket activation code, and its copy does support LISTEN_PID. Some extra fixups are needed to ensure that the code can be used for both, but that's what this patch does. The main change is to replace get_listen_fds's "consume" argument with the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code. Cc: "Richard W.M. Jones" Cc: Stefan Hajnoczi Reviewed-by: Daniel P. Berrange Signed-off-by: Paolo Bonzini --- util/Makefile.objs | 1 + 1 file changed, 1 insertion(+) (limited to 'util/Makefile.objs') diff --git a/util/Makefile.objs b/util/Makefile.objs index 06366b5828..c6205ebf86 100644 --- a/util/Makefile.objs +++ b/util/Makefile.objs @@ -42,3 +42,4 @@ util-obj-y += log.o util-obj-y += qdist.o util-obj-y += qht.o util-obj-y += range.o +util-obj-y += systemd.o -- cgit v1.2.1