From nobody Mon May 25 13:47:54 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=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1777128578; cv=none; d=zohomail.com; s=zohoarc; b=gIaY35UAygRBwu4R0eGOWOX+rJekkr+h/KCz3beLoVLrEa6GgVOtao32kqvt+G0zJYI2PH6893CjiPlQCd5/MgzfS4CdwV9lflWzY2Vwb4/xgHPQnFIUTn9741j/3K9EYaeaFO6RkTZhWEvQi4JietmV6TXz1z+xnlci6D4KDEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777128578; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VdslDAgwKLUM3XSx1yPnR4k9zQngtoTduY8JCxrOAzY=; b=hoxo//h77K4EVge0kdpYCTVnpl1SpwT210ARS9MX0zbRsC2dBumnbc5Z4GNxkq6yFX7Spxxdrbg2fIop5GKyFgwhVHRaHx3EhS4P/VOw90FLFGtlHUGTZx/JVZbZnH8NQZND9I5xFXW89wi19DbdS6879BhGjRrHeUMjYFp6Apc= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777128578401218.2896884070209; Sat, 25 Apr 2026 07:49:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wGeJj-0001qa-Hy; Sat, 25 Apr 2026 10:49:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wGeJf-0001q2-EE for qemu-devel@nongnu.org; Sat, 25 Apr 2026 10:49:07 -0400 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wGeJd-0008Eu-UV for qemu-devel@nongnu.org; Sat, 25 Apr 2026 10:49:07 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 155A044445; Sat, 25 Apr 2026 14:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35012C2BCB0; Sat, 25 Apr 2026 14:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777128543; bh=Y2jfW2n5SXWlVYI4a1aoFFMe9VI36vJwyPaPM10gar0=; h=From:To:Cc:Subject:Date:From; b=nen1BdWBwcMEXquLTXqIbUm4IbFtrLHj9vrw1SrzQK+jwi9PBdph9FGqNVLauE1li /DrJVN7WuJqFy3tbGZXsvEa1yUaEpDJJdiYtINiTjsVL/TkWBFO+fPaE4eXtFITN0w YZaTgpZz8lQmRaxawe4ygwytu7HoFDWUZQWzhxz7ZUIsckqe0vcEHZT7Wm0jjDM5Y0 6Rd+E5LG3jvZIP5K2xbOWtyLUky9ma1N0dNDccHH6FP6TFmTpCe+oEe+aUeDqAn+t2 ZyOi+wol++rehqKt5eeNnZh5T7mRwIJ9JXYKqNOaXNWoqTvj0Isg+w85U0Z2K7y4dg BatmRgx5tnzqQ== From: Helge Deller To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH] linux-user: Flush errors by using exit() instead of _exit() in error path Date: Sat, 25 Apr 2026 16:48:52 +0200 Message-ID: <20260425144852.46590-1-deller@kernel.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2600:3c0a:e001:78e:0:1991:8:25; envelope-from=deller@kernel.org; helo=sea.source.kernel.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 @kernel.org) X-ZM-MESSAGEID: 1777128579093158500 Content-Type: text/plain; charset="utf-8" From: Helge Deller Qemu user mode does not properly flushes error messages related to bad arguments when exiting (at least when the output is piped to a file instead of running on a terminal). Ensure that we always flush by using exit() instead of _exit(). Reported by: Tobias Bergkvist Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2544 Signed-off-by: Helge Deller Reviewed-by: Warner Losh --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/main.c b/linux-user/main.c index c49d1e91d2..84e110dfe9 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -767,7 +767,7 @@ int main(int argc, char **argv, char **envp) execfd =3D open(exec_path, O_RDONLY); if (execfd < 0) { printf("Error while loading %s: %s\n", exec_path, strerror(err= no)); - _exit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } =20 --=20 2.53.0