From nobody Wed Jun 14 13:26:28 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 4Qh5mP35CCz4dhXg; Wed, 14 Jun 2023 13:26:29 +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 4Qh5mP2DkSz3tF9; Wed, 14 Jun 2023 13:26:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686749189; 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=1pPl4Cu3rE+7GUrvxAUmHeYmpYiYKmhXJqo9rL6VsM0=; b=X0J9lmSSU1fRrjgxetieHLM2I4R17JFyL1E8HaAVw3BGOYC0ncuLPMMUrZakg8jriefJ/6 jpakKMWxnGZ/1IgEKs3pdhqct26ijSy7cnZJXN1ubEtwJqcKCQqwICQeoZPhThDqGcutlF CNdxcDaevcpJRZ6OsbEZh/L4yiG2pBW1CHYb4rtNtSfjZ428AWKVFY1IAZwjbtvL7zIe6T DN5Hl3QvpdbemTwfYDkllzqnCuTXKfKsacBMxjkKoEW3KBk1QJa3ks2XfX7MPf178Oi8X3 bRM4Za4FL4bOPhGDBm0zC7XgtIiymj9lCHiDbusQnedVHaLzIHnnqVZdnf2mvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686749189; 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=1pPl4Cu3rE+7GUrvxAUmHeYmpYiYKmhXJqo9rL6VsM0=; b=DULTszDUVwmwm/4/+UiVDqOADKdR7loD5KRlD2Aa/iFnn+94c3bjz8TyrumGvXsQg6RfpI O//dUJ61z+Es/JnFI6T73cIcsXD1ngnEB+2z5qek/0rlNTry52Cf+NVQ/7LsimCYKUJhcR lj255ak60zIjptva0LsgF4Py1MA0ekktzylOXBrpTmNOKt17l/oaoxW3eeWue9P0ZXFtnW TUAdcEKmAg+DoU4JG5CIvcbDQhNR8N8MXwWyBYgydD9WfuFbGGVmNbf9ujJGv8P7ky40wM uANS/BG7YL4p7+cf1/Sm7TLh07UaIWLnAWjgQgeihvKcE166aD8A0CSKqUCuBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686749189; a=rsa-sha256; cv=none; b=I2IL4sJE8bq41Qq7ovikN6tdF7fGWYmQtP0FBxCwu3/gOk50MZuXk0F62w2hEwcOvhV5oF oQsLB7a5fJS+wzjDGUmwazytzmZpYQaVAZ0FA22e2P1fbS03111LinrtSNJ0SYqFwd5acw YQHXEubu47HMtaJ2gF9m3PwMvwWxJ9sQPLw7VThPXtVPsGYUqrMJbtO9BJPOyISskBnH08 Jv5n53uHEB30rPEkPBqiGMXbK806f3HQ7uDvhlwr37MjTj/KBWKqEVhPwsyKB9t7aEzaqq 9LUGKVgA7bpdBbhrc+qIX3tyqti9Y4rOXLryfYuHdmXhsGwL1fyBwNj0MNCjFw== 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 4Qh5mP16MXz1568; Wed, 14 Jun 2023 13:26:29 +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 35EDQSgE099445; Wed, 14 Jun 2023 13:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35EDQS7O099444; Wed, 14 Jun 2023 13:26:28 GMT (envelope-from git) Date: Wed, 14 Jun 2023 13:26:28 GMT Message-Id: <202306141326.35EDQS7O099444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: cfb53f983f14 - stable/13 - ncal: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: cfb53f983f147a9c8388154a256c8b47be470f1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cfb53f983f147a9c8388154a256c8b47be470f1b commit cfb53f983f147a9c8388154a256c8b47be470f1b Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-14 12:42:28 +0000 ncal: 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/D39958 (cherry picked from commit 5903d9c00b75f17f09404d1001ee5aaae7603a61) --- usr.bin/ncal/ncal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 641c59f71e10..35266c225bce 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -497,6 +497,8 @@ main(int argc, char *argv[]) monthrangeb(y, m, flag_julian_day, before, after); else monthranger(y, m, flag_julian_day, before, after); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); return (0); }