[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] io/command: implement portable spawn
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH] io/command: implement portable spawn |
Date: |
Thu, 1 Sep 2022 14:00:28 +0100 |
User-agent: |
Mutt/2.2.6 (2022-06-05) |
On Thu, Sep 01, 2022 at 03:15:53PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Using GLib spawn API is both simpler and portable.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> io/channel-command.c | 115 ++++++++-----------------------------------
> 1 file changed, 21 insertions(+), 94 deletions(-)
> + ioc = qio_channel_command_new_pid(stdinfd,
> + stdoutfd,
> +#ifdef _WIN32
> + GetProcessId(pid)
> +#else
> + pid
> +#endif
> + );
THe pid parameter is declared as 'pid_t' but GetProcessId returns
DWORD - are those types guaranteed compatible.
Also the pid passed into qio_channel_command_new_pid is used
by qio_channel_command_close/abort, to kill off the process,
but this code is stubbed out in WIN32 and this patch hasn't
provided an impl.
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 :|