mirror of https://gitee.com/openkylin/qemu.git
slirp: Enable fork_exec support on Windows
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> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6b744ea42a
commit
e589a4423f
14
slirp/misc.c
14
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
|
static int
|
||||||
slirp_socketpair_with_oob(int sv[2])
|
slirp_socketpair_with_oob(int sv[2])
|
||||||
{
|
{
|
||||||
|
@ -132,7 +121,9 @@ err:
|
||||||
static void
|
static void
|
||||||
fork_exec_child_setup(gpointer data)
|
fork_exec_child_setup(gpointer data)
|
||||||
{
|
{
|
||||||
|
#ifndef _WIN32
|
||||||
setsid();
|
setsid();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -177,7 +168,6 @@ fork_exec(struct socket *so, const char *ex)
|
||||||
qemu_set_nonblock(so->s);
|
qemu_set_nonblock(so->s);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
char *slirp_connection_info(Slirp *slirp)
|
char *slirp_connection_info(Slirp *slirp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue