From nobody Tue Apr 30 12:32:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1542675508629330.0894314341035; Mon, 19 Nov 2018 16:58:28 -0800 (PST) Received: from localhost ([::1]:59663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOuMf-0006C8-72 for importer@patchew.org; Mon, 19 Nov 2018 19:58:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOuLm-0005Jf-2I for qemu-devel@nongnu.org; Mon, 19 Nov 2018 19:57:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOuLi-0002wy-TP for qemu-devel@nongnu.org; Mon, 19 Nov 2018 19:57:09 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58400) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOuLi-0002to-NA for qemu-devel@nongnu.org; Mon, 19 Nov 2018 19:57:06 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 02C7E34A0; Tue, 20 Nov 2018 01:57:05 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cxVhsHnEnUb2; Tue, 20 Nov 2018 01:57:03 +0100 (CET) Received: from function (lfbn-bor-1-169-137.w90-50.abo.wanadoo.fr [90.50.25.137]) by hera.aquilenet.fr (Postfix) with ESMTPSA id DB014349E; Tue, 20 Nov 2018 01:57:02 +0100 (CET) Received: from samy by function with local (Exim 4.91) (envelope-from ) id 1gOuLe-0002Ql-4N; Tue, 20 Nov 2018 01:57:02 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org Date: Tue, 20 Nov 2018 01:57:01 +0100 Message-Id: <20181120005701.9304-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PATCH] slirp: Enable fork_exec support on Windows X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jan.kiszka@siemens.com, stefanha@redhat.com, marcandre.lureau@redhat.com, Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" g_spawn_async_with_fds is portable on Windows, so we can now enable fork_exec support there. Thanks Daniel P. Berrang=C3=A9 for the notice! Signed-off-by: Samuel Thibault Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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, con= st char *cmdline, } =20 =20 -#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 } =20 int @@ -177,7 +168,6 @@ fork_exec(struct socket *so, const char *ex) qemu_set_nonblock(so->s); return 1; } -#endif =20 char *slirp_connection_info(Slirp *slirp) { --=20 2.19.1