From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 260DE312815 for ; Wed, 15 Jul 2026 06:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.153 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784098714; cv=none; b=AQxTryPzPmeJC+Pr3Sld6OjZoBdZI1hxJTbpwpK4PR18zv6df8Evn2zcarrHM/wIIgtZN+lOFdWm+Idi97AMXjGgGRCDa+sggN/FepRP9/c/L8saXUsnyT/4VSV6zvcVJjZuIOk4sfbi0YiiC00c7Ih5iqYkVCMswwEVhxkkv/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784098714; c=relaxed/simple; bh=Lahtq4RGcYGG7HynRUHZDN5LQMK2NhnbaL5xZW87nIs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K9uf/u3gNd1OS9lZswv3XS9KcZkfyK2sECFqnMc0OXBSghIn9zxvR1Vfc/JsY6tohaDbi1VC1PyLkRiWk03HiUl3cQ6Kvtp7O2hl5oH/7HDebg/saSXr/PHkBZMwnKuwliw0qKV+jPBs2EdaAXjR4MNwh3SNOOQcII5QYhRSu3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=bx4dIHNu; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Ln9T2UAJ; arc=none smtp.client-ip=202.12.124.153 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="bx4dIHNu"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ln9T2UAJ" Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 924007A0136; Wed, 15 Jul 2026 02:58:32 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Wed, 15 Jul 2026 02:58:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1784098712; x=1784185112; bh=HFmpHBoki9 yyiq1h5jpND4T7kVav1XXI++w+7c4Xd/M=; b=bx4dIHNu8XWti2e1W1qQskeuJV VyXwNSCcoXSTrUXEBSLIKfqsMbzNUImJEUVV26K2I9bwuDPotjhfiwlJWbAiSkAF JPVSD0APlbdoNX+g+7WyFJyAvMNHGFOnE2z1+j+bloBN/FGIX/EUsjdMXS802api c5UqtDfTn0n9sOWwwWveatP9hX0pEKRp6i6E15i05P8ghZ29Sf9kRPeEUjB+Tw/I PSpWZPQo24+V895i4QohIuvUS0nPdrgl2ZsnEKxnvfC6mog4HmYLbs9ng2uQSBL7 wEN3wM3N2zAcpST7Sz0zWGAfuj2dYFAwSvkH3vP5nRWnIwtIEUs0U7ZZ6ZQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784098712; x=1784185112; bh=HFmpHBoki9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2NAw5g5Azi08a8S1q2YxEeV068oWuFOPaU0n4+WnXlSymQ X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Jul 2026 02:58:31 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 15f13016 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 15 Jul 2026 06:58:31 +0000 (UTC) Date: Wed, 15 Jul 2026 08:58:28 +0200 From: Patrick Steinhardt To: Johannes Schindelin via GitGitGadget Cc: git@vger.kernel.org, Johannes Schindelin Subject: Re: [PATCH 07/11] transport-helper: check dup() return in get_exporter Message-ID: References: <1792042098cd50ba164b90e5ce62430037661343.1784069325.git.gitgitgadget@gmail.com> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1792042098cd50ba164b90e5ce62430037661343.1784069325.git.gitgitgadget@gmail.com> On Tue, Jul 14, 2026 at 10:48:40PM +0000, Johannes Schindelin via GitGitGadget wrote: > diff --git a/transport-helper.c b/transport-helper.c > index 80f90eb7ba..31883b244e 100644 > --- a/transport-helper.c > +++ b/transport-helper.c > @@ -487,6 +487,8 @@ static int get_exporter(struct transport *transport, > /* we need to duplicate helper->in because we want to use it after > * fastexport is done with it. */ > fastexport->out = dup(helper->in); > + if (fastexport->out < 0) > + return error_errno(_("could not dup helper output fd")); > strvec_push(&fastexport->args, "fast-export"); > strvec_push(&fastexport->args, "--use-done-feature"); > strvec_push(&fastexport->args, data->signed_tags ? Makes sense. The only caller already knows to die in case it sees a non-zero return value. Patrick