From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id A55B35A0082 for ; Tue, 14 Feb 2023 12:51:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676375487; h=from:from: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; bh=YnpLcazavfUxaoxeIK5IJz9zczDkScu7Vok0kmq+O5Q=; b=NTaw/SAyFE6dl3il7OBSabicUevs4plUr6u78AlFbYtI3btdeCP1FZMOuXkgXeo9L6wwAH albPAIvO6OKLotu2qBPO4P+gw6VIzoKX3x4bs1Hy/i97O5RhXePM/RjVbNXJSfQ+xd9qx0 XZdKMth02AVV+nlrFpLL/U81TC6OR4g= 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-13-7K1NMjIIMAGvMs8obuA6Kw-1; Tue, 14 Feb 2023 06:51:26 -0500 X-MC-Unique: 7K1NMjIIMAGvMs8obuA6Kw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CFE2E18E0043 for ; 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) 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-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: VB37XBTHC3Y66TZUAF3TN2565GOT673D X-Message-ID-Hash: VB37XBTHC3Y66TZUAF3TN2565GOT673D X-Mailman-Approved-At: Tue, 14 Feb 2023 14:06:27 +0100 CC: sbrivio@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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 = qemuPasstCreateSocketPath(vm, net); g_autoptr(virCommand) cmd = NULL; g_autofree char *pidfile = qemuPasstCreatePidFilename(vm, net); - g_autofree char *errbuf = NULL; char macaddr[VIR_MAC_STRING_BUFLEN]; size_t i; pid_t pid = (pid_t) -1; int exitstatus = 0; int cmdret = 0; + VIR_AUTOCLOSE errfd = -1; cmd = virCommandNew(PASST); virCommandClearCaps(cmd); - virCommandSetErrorBuffer(cmd, &errbuf); + virCommandSetPidFile(cmd, pidfile); + virCommandSetErrorFD(cmd, &errfd); + virCommandDaemonize(cmd); virCommandAddArgList(cmd, "--one-off", "--socket", passtSocketName, "--mac-addr", virMacAddrFormat(&net->mac, macaddr), - "--pid", pidfile, NULL); if (net->mtu) { @@ -263,7 +264,7 @@ qemuPasstStart(virDomainObj *vm, if (cmdret < 0 || exitstatus != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not start 'passt': %s"), errbuf); + _("Could not start 'passt'. exitstatus: %d"), exitstatus); goto error; } -- 2.39.1