From owner-freebsd-bugs@FreeBSD.ORG Sun May 13 14:30:05 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B048106566C for ; Sun, 13 May 2012 14:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CA40F8FC16 for ; Sun, 13 May 2012 14:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4DEU4WA066433 for ; Sun, 13 May 2012 14:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4DEU4Br066432; Sun, 13 May 2012 14:30:04 GMT (envelope-from gnats) Resent-Date: Sun, 13 May 2012 14:30:04 GMT Resent-Message-Id: <201205131430.q4DEU4Br066432@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oleg Ginzburg Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BE2C106564A for ; Sun, 13 May 2012 14:20:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 8827C8FC19 for ; Sun, 13 May 2012 14:20:25 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4DEKPP1031064 for ; Sun, 13 May 2012 14:20:25 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q4DEKPqe031063; Sun, 13 May 2012 14:20:25 GMT (envelope-from nobody) Message-Id: <201205131420.q4DEKPqe031063@red.freebsd.org> Date: Sun, 13 May 2012 14:20:25 GMT From: Oleg Ginzburg To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/167840: man(1) empty zcat argument when is used plain old manpath X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 14:30:05 -0000 >Number: 167840 >Category: misc >Synopsis: man(1) empty zcat argument when is used plain old manpath >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 13 14:30:04 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Oleg Ginzburg >Release: 10-CURRENT >Organization: >Environment: check on emptiness and support of catpages of a variable is necessary if it is >Description: if plain text man file are used, path to file stored in $catpage variables and $manpage remains empty. It breaks man_check_for_so from man(1) utility which tries to execute the "zcat -f" which will expect stdin. Check on emptiness and support for $catpage variable is necessary if this set. >How-To-Repeat: /usr/ports/archivers/rar ports, for example, used old style man: % make -C /usr/ports/archivers/rar install % rehash % whereis rar % man rar it will hang to ctrl+d/ctrl+c >Fix: Patch attached with submission follows: --- usr.bin/man/man.sh-orig 2012-05-13 17:53:13.000000000 +0400 +++ usr.bin/man/man.sh 2012-05-13 17:53:49.000000000 +0400 @@ -255,6 +255,8 @@ local IFS line tstr unset IFS + [ -z "${manpage}" -a -z "${catpage}" ] && return 0 + [ -z "${manpage}" -a -n "${catpage}" ] && manpage=${catpage} # We need to loop to accommodate multiple .so directives. while true >Release-Note: >Audit-Trail: >Unformatted: