[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/3] io/command: use glib GSpawn, instead of open-coding f
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 1/3] io/command: use glib GSpawn, instead of open-coding fork/exec |
Date: |
Mon, 3 Oct 2022 11:38:53 +0100 |
User-agent: |
Mutt/2.2.7 (2022-08-07) |
On Fri, Sep 02, 2022 at 03:18:58PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Simplify qio_channel_command_new_spawn() with GSpawn API. This will
> allow to build for WIN32 in the following patches.
There a change in semantics here too. The current code only touches
stdin/stdout/stderr. Any other FDs which do NOT have O_CLOEXEC set
will be inherited. With the new code, all FDs except stdin/out/err
will be explicitly closed, because we don't set the flag
G_SPAWN_LEAVE_DESCRIPTORS_OPEN.
The only place we use QIOChannelCommand today is the migration
exec: protocol, and that is only declared to use stdin/stdout.
IOW, this is a good improvement, but we should call this out in
the commit message as a behaviour change.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> include/io/channel-command.h | 2 +-
> io/channel-command.c | 105 ++++++-----------------------------
> 2 files changed, 19 insertions(+), 88 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 1/3] io/command: use glib GSpawn, instead of open-coding fork/exec,
Daniel P . Berrangé <=