NetBSD Problem Report #170

From gnats  Thu Mar 17 06:40:03 1994
Received: from csi0.csi.uottawa.ca (csi0.csi.uottawa.ca [137.122.24.51]) by sun-lamp.cs.berkeley.edu (8.6.7/8.6.6) with SMTP id GAA19541 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Thu, 17 Mar 1994 06:40:02 -0800
Message-Id: <9403171341.AA10610@csi0.csi.uottawa.ca>
Date: Thu, 17 Mar 1994 08:41:38 -0500 (EST)
From: Keith White <kwhite@csi.uottawa.ca>
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: man -w problem

>Number:         170
>Category:       bin
>Synopsis:       redirection of 'man -w' has unexpected result
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 17 06:50:01 +0000 1994
>Closed-Date:    Fri Mar 18 00:47:23 +0000 1994
>Last-Modified:  
>Originator:     Keith White
>Release:        netbsd-current
>Organization:
Department of Computer Science, University of Ottawa
>Environment:

System: NetBSD kewbat 0.9a KEWBAT#7 i386


>Description:
	If you redirect the output of 'man -w' you get the contents of 
the manpage rather than the expected list of pathnames.

>How-To-Repeat:
Not for the unwary!

	ls -l `man -w man`

>Fix:

% what /usr/bin/man
/usr/bin/man
        config.c        8.5 (Berkeley) 11/26/93
         Copyright (c) 1987, 1993
        man.c   8.13 (Berkeley) 12/20/93

The following patch fixes the problem:


*** man.c.orig	1994/03/11 22:32:57
--- man.c	1994/03/11 22:39:29
***************
*** 133,139 ****
  	if (!*argv)
  		usage();

! 	if (!f_cat && !f_how)
  		if (!isatty(1))
  			f_cat = 1;
  		else if ((pager = getenv("PAGER")) != NULL)
--- 133,139 ----
  	if (!*argv)
  		usage();

! 	if (!f_cat && !f_how && !f_where)
  		if (!isatty(1))
  			f_cat = 1;
  		else if ((pager = getenv("PAGER")) != NULL)

...keith
-- 
Keith White, Department of Computer Science, University of Ottawa
kwhite@csi.uottawa.ca [+1 613 564 5455]
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Thu Mar 17 16:47:23 PST 1994 
State-Changed-Why:  
applied and punted to bostic for inclusion in his sources. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.