Skip to content

Commit

Permalink
slirp: Enable fork_exec support on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sthibaul committed Jan 13, 2019
1 parent 6b744ea commit e589a44
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions slirp/misc.c
Expand Up @@ -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])
{
Expand Down Expand Up @@ -132,7 +121,9 @@ slirp_socketpair_with_oob(int sv[2])
static void
fork_exec_child_setup(gpointer data)
{
#ifndef _WIN32
setsid();
#endif
}

int
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit e589a44

Please sign in to comment.