Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Aug 2010 22:40:08 GMT
From:      Alexander Best <arundel@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/143271: [patch] whatis(1) should print error message to stderr
Message-ID:  <201008012240.o71Me8EP073263@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/143271; it has been noted by GNATS.

From: Alexander Best <arundel@freebsd.org>
To: Jan Schaumann <jschauma@netmeister.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/143271: [patch] whatis(1) should print error message to stderr
Date: Sun, 1 Aug 2010 22:39:53 +0000

 On Sun Aug  1 10, Jan Schaumann wrote:
 > Alexander Best <arundel@freebsd.org> wrote:
 >  
 > > however i don't see why whatis'es return values should be altered.
 > > it's common practice to return 0 on success. so returning 0 if whatis
 > > recognizes the keyword is just fine.
 
 oh i'm sorry. i think this was a misunderstanding then. indeed this is a bug. although the whatis(1) manual only talks about the return status of apropos i also checked apropos and it also returns 0 if nothing was found.
 
 so this is just plain wrong and apropos/whatis don't do what they're supposed to according to the manual.
 
 cheers.
 alex
 
 > 
 > The problem is that whatis(1) returns 0 even if it does NOT find
 > anything, which should be an error condition.
 > 
 > $ whatis oink
 > oink: nothing appropriate
 > $ echo $?
 > 0
 > $ 
 > 
 > -Jan
 
 
 
 -- 
 a13x



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008012240.o71Me8EP073263>