From nobody Sat Apr 20 08:30:46 2024 X-Original-To: dev-commits-src-main@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 4VM4Tf3qZyz5HK7L; Sat, 20 Apr 2024 08:30:46 +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 4VM4Tf3MMkz475P; Sat, 20 Apr 2024 08:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713601846; 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=RaEX0LAmjXUdeFoCWPqCfoqZv5AXkdMg1+2GCqawrYQ=; b=AsXYzcH2naRxauQC0+srX8Rjdl/k4WMgPMVKUe+Ra64+KdfSo3+ORcQar1SMqpgKZJ31dA ZDBEr0uiBHF8+AQj26K9mLzAWdenQUvcWa4EQzKFCKoL7keK0dws+XHg5n07y+SLA8l6L2 LW75oh0myvMTuxda9ZAU0XQbI+TK2w8txOn47vk8+AnLJJZYWvi9fEDEXH7VK4h2exAByT +zg0kp2e2vvB25OOUc1wfoXSwU9wz4NWwTdwJFfIgey6xuP8c7Cw1J9XT9gmVoJ+NdWRLf l1ZWaEdV/h7XrOP1KIBuH5DU1xOWQTlv1s6Hnd2/XEvTtfC4VXsd4XICPtNq3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713601846; a=rsa-sha256; cv=none; b=Xzrbil+soPeNRE5dSYp6ntPslZClEauZBowaF+q4sVq6lnkq9Iin9Syp6m1dJxICTlyboE 1hTjelWCC7bGYI71BQGcsFEDrDFg7RjTsZ36ZkxKdmh1CKceQ3wONnBtXvPnv3C4qVC4Si hpb3GI0r/BPZz6U2AHha+PNaCaiOOb6tE6V56Lu6kGif90btrt3IMKGye4Ikghsp32va3C aDfQ5hTAMjxjfEDSBkD0qeNXKtXG67ZqEBs8J4Uz8cxHAvDYeIXv5a5EBxzmO33eO3gzzP U5MF9gxHrJSUN0MaxBopOEtPJ9Sike6cj3Nq1YaidwqsOfhN+Gxdaeo1NKCN5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713601846; 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=RaEX0LAmjXUdeFoCWPqCfoqZv5AXkdMg1+2GCqawrYQ=; b=WU5O/iBkQhZPdBIaCOxudCoTWZ+Mc64UmWFhfcnPX2uD6XMYTQ7gzhQda1R4f8QPCJBEo2 4hu8koNQWFHgNmoPaNe4rJJ7xMtj3dH6B41Rnuum8XtIr0EZpG0IoJ/OdfjRc4K9X+CStl 5R46MTDn5XgbugwvjR4asX3HDZ9xw4jwKae4Yc0d2uOjv30JtsIBtwib+HPdI+U8dTlAys b2zV3PlO+OhMAzJ9v4PzqNaQDeqWNEDWYkuD+/l7bu+Dspjpzux/T0q/uzUAVc2NV5NLP/ pdebpzKTo6pqHrBegAbXmb3BEUl980YUq/Tms3oy0BA8nKt5pLo+5apsa6xqxQ== 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 4VM4Tf2vS8zV7b; Sat, 20 Apr 2024 08:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43K8UkQi000572; Sat, 20 Apr 2024 08:30:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43K8UkDt000569; Sat, 20 Apr 2024 08:30:46 GMT (envelope-from git) Date: Sat, 20 Apr 2024 08:30:46 GMT Message-Id: <202404200830.43K8UkDt000569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 14a5c1068d37 - main - man: do not ignore the exit status of roff tools List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14a5c1068d3751173dc41f3097b12e95791b2160 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=14a5c1068d3751173dc41f3097b12e95791b2160 commit 14a5c1068d3751173dc41f3097b12e95791b2160 Author: Wolfram Schneider AuthorDate: 2024-04-20 08:24:58 +0000 Commit: Wolfram Schneider CommitDate: 2024-04-20 08:30:33 +0000 man: do not ignore the exit status of roff tools PR: 223516 Approved by: emaste, bapt Differential Revision: https://reviews.freebsd.org/D44798 --- usr.bin/man/man.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index fd51648757a9..03803b777463 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -33,6 +33,12 @@ # it is better to terminate it. ulimit -t 20 +# do not ignore the exit status of roff tools +set -o pipefail + +# ignore SIGPIPE exits because pagers may exit before reading all their input. +trap '' SIGPIPE + # Usage: add_to_manpath path # Adds a variable to manpath while ensuring we don't have duplicates. # Returns true if we were able to add something. False otherwise. @@ -312,7 +318,7 @@ man_check_for_so() { # We need to loop to accommodate multiple .so directives. while true do - line=$($cattool "$manpage" | head -n1) + line=$($cattool "$manpage" 2>/dev/null | head -n1) case "$line" in .so*) trim "${line#.so}" decho "$manpage includes $tstr"