From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F3AF0158089 for ; Wed, 13 Sep 2023 09:27:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF4EE2BC06C; Wed, 13 Sep 2023 09:27:48 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 97CC62BC014 for ; Wed, 13 Sep 2023 09:27:48 +0000 (UTC) From: Ulrich Mueller To: Eli Schwartz Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: teach setuptools to respect (some) build options In-Reply-To: <1affddb8-221c-4c67-4395-03c2425d0e0e@gmail.com> (Eli Schwartz's message of "Tue, 12 Sep 2023 22:07:31 -0400") References: <20230912191501.536700-1-eschwartz93@gmail.com> <1affddb8-221c-4c67-4395-03c2425d0e0e@gmail.com> Date: Wed, 13 Sep 2023 11:27:43 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain X-Archives-Salt: 80ae6559-bb11-460d-850d-76c9efc43d17 X-Archives-Hash: 1e54de7d6f25dfba74d49aaec7e5da2b >>>>> On Wed, 13 Sep 2023, Eli Schwartz wrote: >> "|| die" should also be added for the cat command. > Redirecting output to a file in a directory you have just guaranteed > to exist cannot fail. That's a rather bold statement. I can imagine a number of possible failures, e.g. no space left on device, quota exceeded, or a low-level I/O error of the filesystem. Also fork or exec of the cat command could fail (e.g. out of memory). While either of these may be unlikely here, best practice is to check for errors of _all_ external commands.