[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qemu-ga: obey LISTEN_PID when using systemd

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2] qemu-ga: obey LISTEN_PID when using systemd socket activation
Date: Mon, 20 Mar 2017 14:12:25 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Fri, Mar 17, 2017 at 11:57:38AM +0100, Paolo Bonzini wrote:
> On 17/03/2017 10:41, Stefan Hajnoczi wrote:
> >> 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.
> > 
> > I intentionally wrote qga socket activation this way.  It allows socket
> > activation to work together with daemonization.  That combination is
> > probably not very useful so it's fine to get rid of it.
> This works with my patch (and I've tested it now), because it looks up
> LISTEN_FDS only once, way before daemonization.
> The run_agent function grew a parameter that tells it to use
> FIRST_SOCKET_ACTIVATION_FD as the file descriptor, without requiring
> another look at the environment.  (And because daemonization forks but
> doesn't exec, setting the cloexec flag doesn't get in the way either).

Good point, I thought it would exec for some reason but it doesn't need

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]