Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2010 22:40:02 GMT
From:      Jilles Tjoelker <jilles@stack.nl>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/35717: which(1) returns wrong exit status for multiple arguments
Message-ID:  <201007292240.o6TMe2u9098270@freefall.freebsd.org>

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

From: Jilles Tjoelker <jilles@stack.nl>
To: bug-followup@FreeBSD.org, wosch@FreeBSD.org
Cc:  
Subject: Re: bin/35717: which(1) returns wrong exit status for multiple
 arguments
Date: Fri, 30 Jul 2010 00:30:20 +0200

 > [5.x's /usr/bin/which returns 1 if any argument is not found, instead
 > of only when all arguments are not found like 4.x's]
 
 The new behaviour seems consistent with what most other utilities do (if
 an error occurs processing an argument, processing continues with the
 next argument but the exit status will be non-zero). POSIX mentions this
 in "Consequences of Errors" in XCU 1.4 Utility Description Defaults.
 Following this for non-standard utilities is not a requirement but makes
 things more consistent.
 
 There is no standard for which(1). The closest is probably the tcsh(1)
 builtin which behaves like the new /usr/bin/which.
 
 There seems little reason to change.
 
 -- 
 Jilles Tjoelker



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