diff options
author | Wolfram Schneider <wosch@FreeBSD.org> | 2024-04-20 08:24:58 +0000 |
---|---|---|
committer | Wolfram Schneider <wosch@FreeBSD.org> | 2024-04-20 08:30:33 +0000 |
commit | 14a5c1068d3751173dc41f3097b12e95791b2160 (patch) | |
tree | b259019cc0556bac27ed5dc52016fb7f7d69d54e /usr.bin/man | |
parent | 21ffadb6e6e05c2326d9c904d505e15167dd6c10 (diff) | |
download | src-14a5c1068d3751173dc41f3097b12e95791b2160.tar.gz src-14a5c1068d3751173dc41f3097b12e95791b2160.zip |
Diffstat (limited to 'usr.bin/man')
-rwxr-xr-x | usr.bin/man/man.sh | 8 |
1 files changed, 7 insertions, 1 deletions
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" |