On Fri, Sep 02, 2022 at 03:18:58PM +0400, [email protected] wrote: > From: Marc-André Lureau <[email protected]> > > 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 <[email protected]> > --- > include/io/channel-command.h | 2 +- > io/channel-command.c | 105 ++++++----------------------------- > 2 files changed, 19 insertions(+), 88 deletions(-) Reviewed-by: Daniel P. Berrangé <[email protected]> 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 :|
