From nobody Sun Apr 12 04:21:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; t=1771883608; cv=none; d=zohomail.com; s=zohoarc; b=Igiqb3V/doUCKO8eIVLdMxW/hDx+CPGw1rhcNiA6aZOhmL6EIk+Jj4kkoUfz3JuqXzRA+QHu1KsgjzTkz1pAC+TPYAF+46FxzqltYkxdQqeVcygMAccrSCT/Q8jngaLoCS6HqbbaZOfJogN6wNk3SP/bo71/ex+pmAE94frS1uw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771883608; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lgAJpfn5j58COsJrDstrt2K24M7TO3WOwb+h1bXRCsg=; b=TEto9VWxvxZh4T7fBChHix9vCEHzJzb5UWb+qHb1XlaRq6EeH/iNfO8sF2asTRQvQaljZL6xp51qCGfXJZ2bVNFNSzxi3Jz7FRRounnj9bRIZAi6dU1QqAGhanBZrvCuRe5fWhz5vqG/L/GDAQ/0GpPotT5nhKO8OUrfitTzM18= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1771883608790358.78583187614345; Mon, 23 Feb 2026 13:53:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vudr6-0003Hs-Vw; Mon, 23 Feb 2026 16:52:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3JMycaQcKCoMwlmvsl5nvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--pefoley.bounces.google.com>) id 1vudr6-0003HS-2R for qemu-devel@nongnu.org; Mon, 23 Feb 2026 16:52:40 -0500 Received: from mail-yx1-xb149.google.com ([2607:f8b0:4864:20::b149]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3JMycaQcKCoMwlmvsl5nvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--pefoley.bounces.google.com>) id 1vudr4-000138-OO for qemu-devel@nongnu.org; Mon, 23 Feb 2026 16:52:39 -0500 Received: by mail-yx1-xb149.google.com with SMTP id 956f58d0204a3-64c98481d1eso1178788d50.2 for ; Mon, 23 Feb 2026 13:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771883557; x=1772488357; darn=nongnu.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=lgAJpfn5j58COsJrDstrt2K24M7TO3WOwb+h1bXRCsg=; b=mmuOLPgC5ekDag6CH3o5myJ/YEWxgJSmEDGdL4g7bU4A6GCfhidUl3lgoeoXtCCCJE X+GStEjBCPHYOV9314gxu5iv5ai7KAUahBd+Jvgx5ugVvZNiCZ1f9p86kvxMHYeCLMUj laS5XSZjG+L9fXhd00r05yH8zx6dhuoL7rb+L0/YMjwiOWx4X5vwW/5eJGd1SEy0SGaW eMKoLkSZRD/QNreUFAKjvTqyOQI59UUK1tyqzKsB/ExFfEkmkGb/chjNLC/NG781reDO SFzwBb7BTu4Dwq+W1Q+k7YgS5aTUeGp70jT+HLLpPBbxWIy2ce4EX/87KC0mrmPjbTMD tOSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771883557; x=1772488357; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lgAJpfn5j58COsJrDstrt2K24M7TO3WOwb+h1bXRCsg=; b=iOeKSUJ5sWVIzIlAw7MUNf1pbONSMMYahV2PHVXjWQRTKAXygWMd+oLdebb3rbYCZU qyr5j9+NqTXM67AMHqfA6qE1heoRY0RMriHoyiBrNugC3fhf9aXDExukmjdxmJZlFq2a oCxGL+pmkY/P07jcDsxRfXqis11nkhsWQYe/19jK5+9BnVOUx/ypmCGtHC/ADvWjcT4C RNHCCYSgdwWgDQJibs6bEENW7Sds80njWK4bXK1QXmHReswceViA3H8ecBM7c+0E5591 89UPWQ3UY25xgU7z8LngGmir0sKgRmhdeGI1yaj67alpy5Xs/C4oColDnOTTsyWzrN+n go+Q== X-Gm-Message-State: AOJu0YxT9CiCruavuistFiK9AKf9BpQ8K1xUDdTNP+Y83cqb+Kj/ipOH DrpPj2x928+ZBEJTHkieMqOuv262oJt7LkL6PMZ3v0YLZuB1MS5Fs8iEhQilfa+lM9zpflZt+o7 Kjck3u9dBeoUO1YoRrtq4sC5g2HPm7IZdmEd321m1aVyR54/J+IVnqyGl0YWdMmKjalN+waXfMB 5Quq0LsWWu+DMVPXlY6xI2UNZai/aUjN08rFTn009n X-Received: from yxn3.prod.google.com ([2002:a05:690e:83:b0:64a:d018:2e1c]) (user=pefoley job=prod-delivery.src-stubby-dispatcher) by 2002:a05:690e:d56:b0:64a:f0cd:d41 with SMTP id 956f58d0204a3-64c7906b06dmr8208121d50.87.1771883556878; Mon, 23 Feb 2026 13:52:36 -0800 (PST) Date: Mon, 23 Feb 2026 16:52:25 -0500 In-Reply-To: <20260223-passt-v1-0-101c6ba1c88a@google.com> Mime-Version: 1.0 References: <20260223-passt-v1-0-101c6ba1c88a@google.com> X-Mailer: b4 0.14.3 Message-ID: <20260223-passt-v1-2-101c6ba1c88a@google.com> Subject: [PATCH 2/2] Don't try to read the pidfile if passt got a signal From: Peter Foley To: qemu-devel@nongnu.org Cc: Jason Wang , Peter Foley Content-Type: text/plain; charset="utf-8" Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::b149; envelope-from=3JMycaQcKCoMwlmvsl5nvvnsl.jvtxlt1-kl2lsuvunu1.vyn@flex--pefoley.bounces.google.com; helo=mail-yx1-xb149.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @google.com) X-ZM-MESSAGEID: 1771883610333158500 Content-Transfer-Encoding: quoted-printable g_subprocess_get_if_exited returns false if passt was killed by a signal, s= o we fall through to trying to read the pidfile. Update the error when passt exits to include the exit code. Signed-off-by: Peter Foley Reviewed-by: Laurent Vivier --- net/passt.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/net/passt.c b/net/passt.c index b3d4b71314..053c2f5f57 100644 --- a/net/passt.c +++ b/net/passt.c @@ -270,8 +270,17 @@ static int net_passt_start_daemon(NetPasstState *s, in= t sock, Error **errp) return -1; } =20 - if (g_subprocess_get_if_exited(daemon) && - g_subprocess_get_exit_status(daemon)) { + if (g_subprocess_get_if_exited(daemon)) { + gint status =3D g_subprocess_get_exit_status(daemon); + if (status) { + error_setg(errp, "Passt exited with code %d", status); + return -1; + } + } + + if (g_subprocess_get_if_signaled(daemon)) { + error_setg(errp, "Passt killed with signal %d", + g_subprocess_get_term_sig(daemon)); return -1; } =20 --=20 2.53.0.371.g1d285c8824-goog