From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, bin.meng@windriver.com
Subject: Re: [PATCH] io/command: implement portable spawn
Date: Thu, 1 Sep 2022 17:19:26 +0400 [thread overview]
Message-ID: <CAMxuvayahS3RmEyY2=eYQ9PrGcJfcQAwDacJjJM0ERS=biASLA@mail.gmail.com> (raw)
In-Reply-To: <YxCs7A/XmaGyGsJ+@redhat.com>
Hi
On Thu, Sep 1, 2022 at 5:00 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> 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.
I think pid_t is mingw specific, and is defined as int64.
(windows crt uses int, apparently)
>
> 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.
ok, I'll update the patch and actually test it on win32 too ;)
>
>
> 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 parent reply other threads:[~2022-09-01 13:26 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é
2022-09-01 13:19 ` Marc-André Lureau [this message]
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='CAMxuvayahS3RmEyY2=eYQ9PrGcJfcQAwDacJjJM0ERS=biASLA@mail.gmail.com' \
--to=marcandre.lureau@redhat.com \
--cc=berrange@redhat.com \
--cc=bin.meng@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).