From nobody Sun Feb 8 15:07:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1676375494; cv=none; d=zohomail.com; s=zohoarc; b=im4mM8RbhO67IcFrBX5Wjm05SxW+0+1CTEeibp5+OiiEj3GQ/eSnWFWVPdo0BjMFKAQyyl4NDp8Jy7PRs7cEhYImqFAFw2X3re5Y485D2g5gJL5ZMTbgYgh+bb2YtuV2I1YfsVK9nuNJ78v4JhVzSoQI1hurLy7VsJJRnZbA9vI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676375494; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YnpLcazavfUxaoxeIK5IJz9zczDkScu7Vok0kmq+O5Q=; b=Kip9f+b+QwHD/JvOIOzIvGHeYOcvRASKKfZ9uqNsxcJTZOiCeuohJeuvMmvi7UXa0nyWb0+95Q/BDi77g+zuvv0UOGEEqXmF96Mc8ws2MszskkTSFV6PAPYgnWyTxQN5q+0QF45TQ1+BEoSwdMUXygWJ7f1DZBSBvKZDaHAU35s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1676375494849138.3116945492817; Tue, 14 Feb 2023 03:51:34 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-335-UZSik800OSenMU5C9bYK7w-1; Tue, 14 Feb 2023 06:51:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68DE0971087; Tue, 14 Feb 2023 11:51:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5645E40C1423; Tue, 14 Feb 2023 11:51:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 439931946588; Tue, 14 Feb 2023 11:51:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E21ED1946586 for ; Tue, 14 Feb 2023 11:51:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D2DED141510F; Tue, 14 Feb 2023 11:51:25 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 434B51415108; Tue, 14 Feb 2023 11:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676375493; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YnpLcazavfUxaoxeIK5IJz9zczDkScu7Vok0kmq+O5Q=; b=Pgm94CRgJ2GS0OlQ6tS/z07SYQOO0XyYUVlwLAxRT21XUJZkUr5mtU3nUuW71vcyRopUBM WMVEfecEeznHG/GZ5cQuJ1W5NVLa9Fdd7pnH/36ymyU7iL6pN/P15cEaJrj7H+sEKSRAJj 8KdV8W0P+q7pRQt38Atf/nHIc473hkw= X-MC-Unique: UZSik800OSenMU5C9bYK7w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/4] Revert "qemu: allow passt to self-daemonize" Date: Tue, 14 Feb 2023 12:51:19 +0100 Message-Id: <77f3fc97d2343f25b85a2cc2295fc6f022c984d7.1676374699.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sbrivio@redhat.com, passt-dev@passt.top Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1676375495763100003 Content-Type: text/plain; charset="utf-8"; x-default="true" This reverts commit 0c4e716835eaf2a575bd063fde074c0fc7c4e4d4. This patch was pushed by my mistake. Even though it got ACKed on the list, I've raised couple of issues with it. They will be fixed in next commits. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- src/qemu/qemu_passt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index f640a69c00..0f09bf3db8 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c @@ -141,23 +141,24 @@ qemuPasstStart(virDomainObj *vm, g_autofree char *passtSocketName =3D qemuPasstCreateSocketPath(vm, net= ); g_autoptr(virCommand) cmd =3D NULL; g_autofree char *pidfile =3D qemuPasstCreatePidFilename(vm, net); - g_autofree char *errbuf =3D NULL; char macaddr[VIR_MAC_STRING_BUFLEN]; size_t i; pid_t pid =3D (pid_t) -1; int exitstatus =3D 0; int cmdret =3D 0; + VIR_AUTOCLOSE errfd =3D -1; =20 cmd =3D virCommandNew(PASST); =20 virCommandClearCaps(cmd); - virCommandSetErrorBuffer(cmd, &errbuf); + virCommandSetPidFile(cmd, pidfile); + virCommandSetErrorFD(cmd, &errfd); + virCommandDaemonize(cmd); =20 virCommandAddArgList(cmd, "--one-off", "--socket", passtSocketName, "--mac-addr", virMacAddrFormat(&net->mac, macaddr= ), - "--pid", pidfile, NULL); =20 if (net->mtu) { @@ -263,7 +264,7 @@ qemuPasstStart(virDomainObj *vm, =20 if (cmdret < 0 || exitstatus !=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not start 'passt': %s"), errbuf); + _("Could not start 'passt'. exitstatus: %d"), exits= tatus); goto error; } =20 --=20 2.39.1