* [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows
@ 2018-11-20 0:57 Samuel Thibault
2018-11-20 6:00 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Samuel Thibault @ 2018-11-20 0:57 UTC (permalink / raw)
To: qemu-devel
Cc: Samuel Thibault, stefanha, jan.kiszka, eblake, marcandre.lureau,
berrange
g_spawn_async_with_fds is portable on Windows, so we can now enable
fork_exec support there.
Thanks Daniel P. Berrangé for the notice!
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
slirp/misc.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/slirp/misc.c b/slirp/misc.c
index 7972b9b05b..59b4e8f31c 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -62,17 +62,6 @@ int add_exec(struct ex_list **ex_ptr, void *chardev, const char *cmdline,
}
-#ifdef _WIN32
-
-int
-fork_exec(struct socket *so, const char *ex)
-{
- /* not implemented */
- return 0;
-}
-
-#else
-
static int
slirp_socketpair_with_oob(int sv[2])
{
@@ -132,7 +121,9 @@ err:
static void
fork_exec_child_setup(gpointer data)
{
+#ifndef _WIN32
setsid();
+#endif
}
int
@@ -177,7 +168,6 @@ fork_exec(struct socket *so, const char *ex)
qemu_set_nonblock(so->s);
return 1;
}
-#endif
char *slirp_connection_info(Slirp *slirp)
{
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows
2018-11-20 0:57 [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows Samuel Thibault
@ 2018-11-20 6:00 ` Marc-André Lureau
2018-11-20 9:46 ` Daniel P. Berrangé
2018-11-26 14:09 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2018-11-20 6:00 UTC (permalink / raw)
To: Samuel Thibault
Cc: qemu-devel, Stefan Hajnoczi, Kiszka, Jan, Blake, Eric,
P. Berrange, Daniel
Hi
On Tue, Nov 20, 2018 at 4:57 AM Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> g_spawn_async_with_fds is portable on Windows, so we can now enable
> fork_exec support there.
>
> Thanks Daniel P. Berrangé for the notice!
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> slirp/misc.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/slirp/misc.c b/slirp/misc.c
> index 7972b9b05b..59b4e8f31c 100644
> --- a/slirp/misc.c
> +++ b/slirp/misc.c
> @@ -62,17 +62,6 @@ int add_exec(struct ex_list **ex_ptr, void *chardev, const char *cmdline,
> }
>
>
> -#ifdef _WIN32
> -
> -int
> -fork_exec(struct socket *so, const char *ex)
> -{
> - /* not implemented */
> - return 0;
> -}
> -
> -#else
> -
> static int
> slirp_socketpair_with_oob(int sv[2])
> {
> @@ -132,7 +121,9 @@ err:
> static void
> fork_exec_child_setup(gpointer data)
> {
> +#ifndef _WIN32
> setsid();
> +#endif
> }
>
> int
> @@ -177,7 +168,6 @@ fork_exec(struct socket *so, const char *ex)
> qemu_set_nonblock(so->s);
> return 1;
> }
> -#endif
>
> char *slirp_connection_info(Slirp *slirp)
> {
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows
2018-11-20 0:57 [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows Samuel Thibault
2018-11-20 6:00 ` Marc-André Lureau
@ 2018-11-20 9:46 ` Daniel P. Berrangé
2018-11-26 14:09 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2018-11-20 9:46 UTC (permalink / raw)
To: Samuel Thibault
Cc: qemu-devel, stefanha, jan.kiszka, eblake, marcandre.lureau
On Tue, Nov 20, 2018 at 01:57:01AM +0100, Samuel Thibault wrote:
> g_spawn_async_with_fds is portable on Windows, so we can now enable
> fork_exec support there.
>
> Thanks Daniel P. Berrangé for the notice!
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> slirp/misc.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows
2018-11-20 0:57 [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows Samuel Thibault
2018-11-20 6:00 ` Marc-André Lureau
2018-11-20 9:46 ` Daniel P. Berrangé
@ 2018-11-26 14:09 ` Philippe Mathieu-Daudé
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-26 14:09 UTC (permalink / raw)
To: Samuel Thibault, qemu-devel
Cc: jan.kiszka, stefanha, marcandre.lureau, Alex Bennée,
Fam Zheng
Hi Samuel,
On 20/11/18 1:57, Samuel Thibault wrote:
> g_spawn_async_with_fds is portable on Windows, so we can now enable
> fork_exec support there.
>
> Thanks Daniel P. Berrangé for the notice!
On x86_64 you can build locally using Docker:
$ make docker-test-build@debian-win32-cross
BUILD debian-win32-cross
COPY RUNNER
RUN test-build in qemu:debian-win32-cross
Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu
--prefix=/tmp/qemu-test/install --cross-prefix=i686-w64-mingw32.shared-
CC qga/commands-win32.o
CC qga/channel-win32.o
CC qga/service-win32.o
CC qga/vss-win32.o
...
>From the qemu source repository, you can also run once:
$ docker run --rm -it \
-v $PWD:$PWD -w $PWD -v /tmp:/tmp \
-u $UID \
qemu:debian-win32-cross \
bash -c 'mkdir build_win32 && cd build_win32 && ../configure
$QEMU_CONFIGURE_OPTS && make -j4'
Then to avoid rebuilding the world everytime, when you applied/modified
win32 related patches:
$ docker run --rm -it \
-v $PWD:$PWD -w $PWD -v /tmp:/tmp \
-u $UID \
qemu:debian-win32-cross \
bash -c 'make -C build_win32 -j4'
You can not 'run' the binary, but at least you can verify
compilation/linking steps.
Regards,
Phil.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> slirp/misc.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/slirp/misc.c b/slirp/misc.c
> index 7972b9b05b..59b4e8f31c 100644
> --- a/slirp/misc.c
> +++ b/slirp/misc.c
> @@ -62,17 +62,6 @@ int add_exec(struct ex_list **ex_ptr, void *chardev, const char *cmdline,
> }
>
>
> -#ifdef _WIN32
> -
> -int
> -fork_exec(struct socket *so, const char *ex)
> -{
> - /* not implemented */
> - return 0;
> -}
> -
> -#else
> -
> static int
> slirp_socketpair_with_oob(int sv[2])
> {
> @@ -132,7 +121,9 @@ err:
> static void
> fork_exec_child_setup(gpointer data)
> {
> +#ifndef _WIN32
> setsid();
> +#endif
> }
>
> int
> @@ -177,7 +168,6 @@ fork_exec(struct socket *so, const char *ex)
> qemu_set_nonblock(so->s);
> return 1;
> }
> -#endif
>
> char *slirp_connection_info(Slirp *slirp)
> {
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-26 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-20 0:57 [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows Samuel Thibault
2018-11-20 6:00 ` Marc-André Lureau
2018-11-20 9:46 ` Daniel P. Berrangé
2018-11-26 14:09 ` Philippe Mathieu-Daudé
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).