From nobody Thu May 4 18:52:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xx1dJ2z49Q5R; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC2xx16rMz4J6C; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=PTkxqkeM1XZ+zjvSrDkoYBekXEyyx0TYpsUcu6BKGyGYVOAqNGQA+jlSG90pa7UjcOzG0A VD4273CcVZ3LbzVTwulSM2nMN2fhSRGo8vbBq6yy+xPIeuJGbKhjUujWwFgWIUNfmAc0Hi cHe8ixad0+rZ9jC+WDy4Yh3Rvx9f/cuohy66sK8tsNujQ9fqCT6WdWPDHANNd39nJFD7VB ZEYgTWe4NyqfDYDKrsqC9Hr+HXfwbj+M40hqnE6jQC8MuhAX6U5XG5lJ9xV3amJKv9CREm vJlaorgDW1v5arV8kFE2WHTA+dCmMyRTPrd4/Kj9ga0wjkAB39MET3iHWvzStA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=i+BanNKPuTBrC7SvXoNrTShCdv7esug3JtplY1cTF1FPbxk58nVMFMYbjhPGRyNeQ3XuUD iLfnp8gcpjrjEJY8VL0wvsLf9iZWk3LaV7jFO72huyCAnWLeYNRNsRx1j+XK+ToK237mpj 6aFXdwhcz89VfLxwwy6SYFBXp7IZq4Vj3apeY6ALhVot4Pdf0GuFg4bXHvB81kyfVV+Z1N Do31TCqDkxqseOH3Hm9Rk4nEXMPa/EQGkio9DFIHbUgigSMDAYVV4us0DLjFuSoqOiu+wZ 9eglL6E4P7wwc6mNXojCbNemDQmZa2/2V+clI7ZwzJUG/6tk8Q6CTeqa6F3pBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226373; a=rsa-sha256; cv=none; b=Qru9fNrCzZXOdzT7tmWvMW21KmoUq3D7Y71nVVTlvny1R7l3ZtWE7NousoI+61cZ01SNsv IIsOHBcwUCbdNFuOlqWUAU/VTu7zvY516nIpMjFcMxTgyls3FQzrfIBrKWZrNU399lOF8z zNwgJzOXTAB4gMWQmw5lYzC8PL25SbwceoiwZYtMwhm7dVJkRJKO8gNtaFmR+w8hfHBVAH df9K4jPU+5HI4At6lHPsL8RJgQCcU8e0J6ZJOY9ZpkGG2DMTUsKpisrWqLetJrZpSKhoyx EhGiyUeCLVGl3HeDqxK6wruzk9kEHZc6LJWlKn6jh2z2dAb0g8jlkaY0MIMN8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xx0FBXzP5q; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344IqqRG082029; Thu, 4 May 2023 18:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344Iqq12082028; Thu, 4 May 2023 18:52:52 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:52 GMT Message-Id: <202305041852.344Iqq12082028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: cb46f47c7969 - main - tsort: Error out if writing to stdout failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb46f47c7969b619d1b2547d06a75ad5b375eda9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cb46f47c7969b619d1b2547d06a75ad5b375eda9 commit cb46f47c7969b619d1b2547d06a75ad5b375eda9 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:11 +0000 tsort: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39959 --- usr.bin/tsort/tsort.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 58492b26999c..b2dbe9beb799 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -183,6 +183,8 @@ main(int argc, char *argv[]) /* do the sort */ tsort(); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); }