From: "Daniel P. Berrangé" <berrange@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org, bin.meng@windriver.com
Subject: Re: [PATCH] io/command: implement portable spawn
Date: Thu, 1 Sep 2022 14:00:28 +0100 [thread overview]
Message-ID: <YxCs7A/XmaGyGsJ+@redhat.com> (raw)
In-Reply-To: <20220901111553.2901487-1-marcandre.lureau@redhat.com>
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 :|
next prev parent reply other threads:[~2022-09-01 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 11:15 [PATCH] io/command: implement portable spawn marcandre.lureau
2022-09-01 13:00 ` Daniel P. Berrangé [this message]
2022-09-01 13:19 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YxCs7A/XmaGyGsJ+@redhat.com \
--to=berrange@redhat.com \
--cc=bin.meng@windriver.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.