Subject: Re: bin/31252
To: None <rpaulo@netbsd.org, gnats-admin@netbsd.org,>
From: None <rpaulo@netbsd.org>
List: netbsd-bugs
Date: 09/09/2005 23:03:06
Synopsis: /usr/bin/which does not set a proper exit status

Responsible-Changed-From-To: bin-bug-people->rpaulo
Responsible-Changed-By: rpaulo@netbsd.org
Responsible-Changed-When: Fri, 09 Sep 2005 23:03:05 +0000
Responsible-Changed-Why:
Mine.


State-Changed-From-To: open->feedback
State-Changed-By: rpaulo@netbsd.org
State-Changed-When: Fri, 09 Sep 2005 23:03:05 +0000
State-Changed-Why:
On NetBSD, /usr/bin/which is a hard link to /usr/bin/whereis.
src/usr.bin/whereis/whereis.c has:
	return ((found == 0) ? 3 : ((found >= argc) ? 0 : 2));

And an example usage:
% /usr/bin/which nonexistant
% echo $?
3


I can't see the problem here. Can I close the PR ? Thanks